Rate This Document
Findability
Accuracy
Completeness
Readability

?axpyc

Compute the conjugate of vector x, scale vector x, and then add the product to another vector. The operation is defined as follows:

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 number type for caxpyc
  • Double-precision complex number type for zaxpyc

Multiplication coefficient

Input

x

  • For caxpyc, x is of single-precision complex number type.
  • For zaxpyc, x is of double-precision complex number type.

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

  • For caxpyc, y is of single-precision complex number type.
  • For zaxpyc, y is of double-precision complex number type.

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

Dependencies

#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