FunctionAdd a constant to a vector
Syntax C/C++#include <VFmath.h>
void VF_addC( fVector Y, fVector X, ui size, float C);

    (similarly VD_,   VI_, etc.)
#include <VCFmath.h>
void VCF_addC( cfVector Y, cfVector X, ui size, fComplex C );
void VCF_addReC( cfVector Y, cfVector X, ui size, float CRe );

    (similarly VCD_,   VCE_)
C++ VecObj#include <OptiVec.h>
void vector<T>::addC( const vector<T>& X, const T& C); );
void vector<complex<T>>::addC( const vector<complex<T>>& X, complex<T> C );
void vector<complex<T>>::addReC( const vector<complex<T>>& X, const T& CRe );
Pascal/Delphiuses VFmath;
procedure VF_addC( Y, X:fVector; size:UIntSize; C:Single );

    (similarly VD_,   VI_, etc.)
procedure VCF_addC( Y, X:cfVector; size:UIntSize; C:fComplex );
procedure VCF_addReC( Y, X:cfVector; size:UIntSize; CRe:Single );

    (similarly VCD_,   VCE_)
CUDA function C/C++#include <cudaVFmath.h>
int cudaVF_addC( fVector d_Y, fVector d_X, ui size, float C );
int cusdVF_addC( fVector d_Y, fVector d_X, ui size, float *d_C );
void VFcu_addC( fVector d_Y, fVector d_X, ui size, float C );
#include <cudaVCFmath.h>
int cudaVCF_addReC( cfVector d_Y, cfVector d_X, ui size, float CRe );
int cusdVCF_addReC( cfVector d_Y, cfVector d_X, ui size, float *d_CRe );
void VCFcu_addReC( cfVector h_Y, cfVector h_X, ui size, float CRe );
CUDA function Pascal/Delphiuses VFmath, VCFmath;
function cudaVF_addC( d_Y, d_X:fVector; size:UIntSize; C:Single ): IntBool;
function cusdVF_addC( d_Y, d_X:fVector; size:UIntSize; d_C:PSingle ): IntBool;
procedure VFcu_addC( h_Y, h_X:fVector; size:UIntSize; C:Single );
function cudaVCF_addReC( d_Y, d_X:cfVector; size:UIntSize; CRe:Single );
function cusdVCF_addReC( d_Y, d_X:cfVector; size:UIntSize; d_CRe:PSingle );
procedure VCFcu_addReC( h_Y, h_X:cfVector; size:UIntSize; CRe:Single );
DescriptionYi = Xi + C
The complex floating-point versions exist in two variants, one for complex constants C, the other for real-valued constants CRe added to the complex vector.
Error handlingfloating-point versions: none;
integer versions: see chapter 5.2.
Return valuenone
See alsoVF_addV,   VF_subC,   VF_mulC,   VF_divC,   VF_visC,   VF_redC

VectorLib Table of Contents  OptiVec home