VF_vectorVD_vectorVE_vector
VCF_vectorVCD_vectorVCE_vector
VPF_vectorVPD_vectorVPE_vector
VI_vectorVBI_vectorVSI_vectorVLI_vectorVQI_vector 
VU_vectorVUB_vectorVUS_vectorVUL_vectorVUQ_vectorVUI_vector
FunctionMemory allocation for a vector
Syntax C/C++#include <VFstd.h>
fVector VF_vector( ui size );
Pascal/Delphiuses VecLib;
function VF_vector( size:UIntSize ): fVector;
CUDA function C/C++#include <cudaVFstd.h>
fVector cudaVF_vector( ui size );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_vector( size:UIntSize ): fVector;
DescriptionBased on memory model and environment, the most appropriate allocation procedure is chosen by these functions. Failure to allocate memory always leads to an error message and a subsequent program abort (similar to the error handling of the "new" operator). To release the memory thus allocated, V_free,   V_freeAll, or V_nfree should be used (the latter only in C/C++).
Note: the declaration of a vector (e.g., as fVector) reserves only a name, but no memory!
See chapter 4.1 if you are interested in details of the implementation.
Do not use this function in connection with the object-oriented interface VecObj. It has its own automated memory allocation procedure incorporated into the constructors, see chapter 3.
Error handlingIf there is not enough memory available, or if size is zero, an error message "Not enough memory" is displayed and the program aborted.
32-bit:
If more than 4 GB of memory are requested, an error message "Vector > 4 GB not possible" is displayed and the program aborted.
Return valuePointer to the allocated memory
See alsomalloc,   calloc,   cudaVF_pinnedVector

VectorLib Table of Contents  OptiVec home