FunctionMemory allocation for a vector and initialization of all elements with 0
Syntax C/C++#include <VFstd.h>
fVector VF_vector0( ui size );
Pascal/Delphiuses VecLib;
function VF_vector0( size:UIntSize ): fVector;
CUDA function C/C++#include <cudaVFstd.h>
fVector cudaVF_vector0( ui size );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_vector0( size:UIntSize ): fVector;
DescriptionThe functions of this family are almost identical to those of the VF_vector family; in addition to allocating memory, they initialize all elements with 0. (Calls to VF_vector and VF_vector0 may be mixed; they use the same tables to keep track of the handles and pointers). For further information, see VF_vector.
Do not use this function in connection with the object-oriented interface. 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.
16-bit models (except HUGE):
If more than 64 kB of memory are requested, an error message "Vector > 64 kB not possible" is displayed and the program aborted.
If more than 4 GB of memory are requested, an error message "Vector > 4 GB not possible" is displayed and the program aborted.
Return valueA pointer to the allocated memory is returned.
See alsomalloc,   calloc,   cudaVF_pinnedVector0

VectorLib Table of Contents  OptiVec home