VF_elementVD_elementVE_element
VCF_elementVCD_elementVCE_element
VPF_elementVPD_elementVPE_element
VI_elementVBI_elementVSI_elementVLI_elementVQI_element 
VU_elementVUB_elementVUS_elementVUL_elementVUQ_elementVUI_element
FunctionReturns the value of a vector element
Syntax C/C++#include <VFstd.h>
float VF_element( fVector X, ui pos );
C++ VecObj#include <OptiVec.h>
T vector<T>::element( ui pos );
Pascal/Delphiuses VFstd;
function VF_element( X:fVector; pos:UIntSize ): Single;
CUDA function C/C++#include <cudaVFstd.h>
float cudaVF_element( fVector d_X, ui pos );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_element( d_X:fVector; pos:UIntSize ): Single;
DescriptionThe element at the position pos is returned.
This function is needed to read elements of dynamically allocated vectors. Note that the bracket notation, X[pos] does not work for dynamic OptiVec vectors in Pascal/Delphi; also, it does not work for vectors in CUDA device memory.
VF_element is "read-only". This means, you c a n n o t write something like
VF_element( X, 4 ) := 5;
Error handlingnone
Return valueX[pos]
See alsoVF_Pelement,   VF_setElement,   VF_getElement

VectorLib Table of Contents  OptiVec home