===================== CXXBLAS Level 1: axpy [TOC] ===================== *axpy* (defined in namespace `cxxblas`) computes $y \leftarrow y +\alpha x$ where $x, y$ are vectors and $\alpha$ is a constant scalar. Generic Implementation ====================== *--[CODEREF]----------------------------------------------------------------* | | | template | | void | | axpy(IndexType n, const ALPHA &alpha, const X *x, IndexType incX, | | Y *y, IndexType incY); | | | *---------------------------------------------------------------------------* [c:@N@cxxblas@FT@>4#T#T#T#Taxpy#t0.0#&1t0.1#*1t0.2#] [S0_#*t0.3#S0_#templatetypenameIndexType,typenameAL] [PHA,typenameX,typenameYvoid ] n `(input)` + Specifies the number of elements in vector $x$ and $y$. alpha `(input)` + Scaling factor for the values in $x$. x `(input)` + Pointer to the first element of vector $x$. incX `(input)` + Specifies the increment for indexing vector $x$. y `(input/output)` + Pointer to the first element of vector $y$. incY `(input)` + Specifies the increment for indexing vector $y$. CBLAS Implementation ==================== If a __CBLAS__ implementations like __ATLAS__, __GotoBLAS__, ... is available then the following *optimized variants* are provided. Single Precision ---------------- *--[CODEREF]----------------------------------------------------------------* | | | template | | typename If::isBlasCompatibleInteger | | axpy(IndexType n, const float &alpha, | | const float *x, IndexType incX, | | float *y, IndexType incY); | | | *---------------------------------------------------------------------------* [c:@N@cxxblas@FT@>1#Taxpy#t0.0#&1f#*1f#S0_#*f#S0_#t] [emplatetypenameIndexTypetypenameIfIndexTypeisBlasC] [ompatibleInteger ] Double Precision ---------------- *--[CODEREF]----------------------------------------------------------------* | | | template | | typename If::isBlasCompatibleInteger | | axpy(IndexType n, const double &alpha, | | const double *x, IndexType incX, | | double *y, IndexType incY); | | | *---------------------------------------------------------------------------* [c:@N@cxxblas@FT@>1#Taxpy#t0.0#&1d#*1d#S0_#*d#S0_#t] [emplatetypenameIndexTypetypenameIfIndexTypeisBlasC] [ompatibleInteger ] Complex Single Precision ------------------------ *--[CODEREF]----------------------------------------------------------------* | | | template | | typename If::isBlasCompatibleInteger | | axpy(IndexType n, const ComplexFloat &alpha, | | const ComplexFloat *x, IndexType incX, | | ComplexFloat *y, IndexType incY); | | | *---------------------------------------------------------------------------* [c:@N@cxxblas@FT@>1#Taxpy#t0.0#&1$@N@std@N@__1@C@co] [mplex>#f#*1S2_#S0_#*S2_#S0_#templatetypenameIndexT] [ypetypenameIfIndexTypeisBlasCompatibleInteger ] Complex Double Precision ------------------------ *--[CODEREF]----------------------------------------------------------------* | | | template | | typename If::isBlasCompatibleInteger | | axpy(IndexType n, const ComplexDouble &alpha, | | const ComplexDouble *x, IndexType incX, | | ComplexDouble *y, IndexType incY); | | | *---------------------------------------------------------------------------* [c:@N@cxxblas@FT@>1#Taxpy#t0.0#&1$@N@std@N@__1@C@co] [mplex>#d#*1S2_#S0_#*S2_#S0_#templatetypenameIndexT] [ypetypenameIfIndexTypeisBlasCompatibleInteger ] :links: __CBLAS__ -> http://www.netlib.org/blas/ __ATLAS__ -> http://math-atlas.sourceforge.net __GotoBLAS__ -> http://www.tacc.utexas.edu/tacc-projects/gotoblas2