VF_printVD_printVE_print
VCF_printVCD_printVCE_print
VI_printVBI_printVSI_printVLI_printVQI_print 
VU_printVUB_printVUS_printVUL_printVUQ_printVUI_print
FunctionPrint a vector as ASCII numbers to stdout, assuming a linewidth of 80 characters. Only for console applications.
Syntax C/C++#include <VFstd.h>
void VF_print( fVector X, ui size, unsigned nperline );
C++ VecObj#include <OptiVec.h>
void vector<T>::print( unsigned nperline );
Pascal/Delphiuses VFstd;
procedure VF_print( X:fVector; size:UIntSize; nperline:UInt );
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_print( fVector d_X, ui size, unsigned nperline );
int cudaVF_print_buf( fVector d_X, ui size, unsigned nperline, fVector h_Wk );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_print( d_X:fVector; size:UIntSize; nperline:UInt ): IntBool;
function cudaVF_print_buf( d_X:fVector; size:UIntSize; nperline:UInt; h_Wk:fVector ): IntBool;
Descriptionsize elements of X are printed to stdout, nperline in each line.
C/C++: The linewidth is determined by the symbolic constant V_consoleWindowWidth, defined in <VecLib.h> with a default value of 150 characters. If you wish to change this default value, either change it in <VecLib.h> or write #define V_consoleWindowWidth xxxx before you #include <VecLib.h>.
Pascal/Delphi: The linewidth is determined by the variable V_consoleWindowWidth in the unit VecLib with a default value of 150 characters. If you wish to change this default value, you may simply assign a new value to V_consoleWindowWidth, e.g., V_consoleWindowWidth := 80;

Each line begins with the index of the first element printed into that line. The index is followed by a colon and by the requested nperline elements.

Cartesian complex numbers are printed in braces, with the real and imaginary parts separated by a komma: {Re, Im}. Polar complex numbers are also written in braces, with the Mag and Arg parts separated by an at-sign: {Mag @ Arg}.

In contrast to VF_cprint, no paging is performed.
The number of digits per element is determined by the available space, which depends in turn on nperline.

This family of functions can be used only for console applications.

Error handlingIf nperline exceeds the maximum number of entries possible within 80 characters, an error message "Cannot use requested format (too many entries per line)" is generated; in this case, the program chooses the maximum number nperline possible.

CUDA versions only: cudaV?_print_buf takes a host vector h_Wk as additional argument. The latter serves as buffer memory and needs to be (at least) of the same size as X. By avoiding the need of cudaV?_print to allocate its own buffer memory, cudaV?_print_buf is slightly faster.

Return valuenone
See alsoVF_cprint,   VF_fprint,   VF_write,   VF_store,   printf (C/C++ only)

VectorLib Table of Contents  OptiVec home