Rate This Document
Findability
Accuracy
Completeness
Readability

?axpyc

That is, . alpha is a multiplication coefficient, and x and y are vectors with a length of n.

Interface Definition

C interface:

void cblas_caxpyc(const BLASINT n, const void *alpha, const void *x, const BLASINT incx, void *y, const BLASINT incy);

void cblas_zaxpyc(const BLASINT n, const void *alpha, const void *x, const BLASINT incx, void *y, const BLASINT incy);

Fortran interface:

CALL CAXPYC(N, ALPHA, X, INCX, Y, INCY)

CALL ZAXPYC(N, ALPHA, X, INCX, Y, INCY)

Parameters

Parameter

Type

Description

Input/Output

n

Integer

Number of elements in the x vector.

Input

alpha

  • Single-precision complex type for caxpyc
  • Double-precision complex type for zaxpyc

Multiplication coefficient.

Input

x

  • Single-precision complex type for caxpyc
  • Double-precision complex type for zaxpyc

Vector x. The vector size is at least (1+(n-1)*abs(incx)).

Input

incx

Integer

Increment for the elements of vector x.

Input

y

  • Single-precision complex type for caxpyc
  • Double-precision complex type for zaxpyc

Vector y. The vector size is at least (1+(n-1)*abs(incy)).

Input/Output

incy

Integer

Increment for the elements of vector y.

Input

Dependency

#include "kblas.h"

Examples

C interface:

    float alpha[2] = {0.25, 0.5}; 
    int n = 2, incx = 1, incy = 1; 
    float x[4] = {1.0, 3.0, 5.0, 7.0}; 
    float y[4] = {2.0, 4.0, 6.0, 8.0}; 
 
    cblas_caxpyc(n, alpha, x, incx, y, incy); 
    /** 
     *    Output Y: 3.75, 3.75, 10.75, 8.75
     */
Fortran interface:
      REAL(4) :: ALPHA(2)
      DATA ALPHA /0.25, 0.5 
      INTEGER :: N=5 
      INTEGER :: INCX=1 
      INTEGER :: INCY=1 
      REAL(4) :: X(4) 
      DATA X /1.0, 3.0, 5.0, 7.0/ 
      REAL(4) :: Y(4) 
      DATA Y /2.0, 4.0, 6.0, 8.0/ 
      CALL CAXPYC(N, ALPHA, X, INCX, Y, INCY) 
 
*     Output Y : 3.75, 3.75, 10.75, 8.75