Functionprint a vector to the screen. Only for console applications
Syntax C/C++#include <VFstd.h>
void VF_cprint( fVector X, ui size, unsigned nperline );
C++ VecObj#include <OptiVec.h>
void vector<T>::cprint( unsigned nperline );
Pascal/Delphiuses VFstd;
procedure VF_cprint( X:fVector; size:UIntSize; nperline:UInt );
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_cprint( fVector d_X, ui size, unsigned nperline );
int cudaVF_cprint_buf( fVector d_X, ui size, unsigned nperline, fVector h_Wk );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_cprint( d_X:fVector; size:UIntSize; nperline:UInt ): IntBool;
function cudaVF_cprint_buf( d_X:fVector; size:UIntSize; nperline:UInt; h_Wk:fVector ): IntBool;
Descriptionsize elements of X are printed to the screen (or "console"), into the actual text window, nperline elements in each line.

The display starts always with a new line. Please note that this may lead to an empty line at the beginning.
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}.

The display pauses every screenful. The user is prompted after each page to continue or to stop printing.
The number of digits per element is determined by the available space, which depends in turn on the line width and on the parameter nperline.

CUDA versions only: cudaV?_cprint_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?_cprint to allocate its own buffer memory, cudaV?_cprint_buf is slightly faster.

This family of functions is available only for console applications.

Error handlingIf nperline exceeds the maximum number of entries possible in the current text mode, an error message "Cannot use requested format (too many entries per line)!" is generated; in this case, the program chooses the maximum possible number nperline.
Return valuenone
See alsoVF_fprint,   VF_print,   VF_write,   VF_store,   cprintf

VectorLib Table of Contents  OptiVec home