VF_fhexprintVD_fhexprintVE_fhexprint
VCF_fhexprintVCD_fhexprintVCE_fhexprint
VPF_fhexprintVPD_fhexprintVPE_fhexprint
VI_fhexprintVBI_fhexprintVSI_fhexprintVLI_fhexprintVQI_fhexprint 
VU_fhexprintVUB_fhexprintVUS_fhexprintVUL_fhexprintVUQ_fhexprintVUI_fhexprint
Functionprint a vector in hexadecimal format to a stream
Syntax C/C++#include <VFstd.h>
void VF_fhexprint( FILE *stream, fVector X, ui size, unsigned nperline, unsigned linewidth );
C++ VecObj#include <OptiVec.h>
void vector<T>::fhexprint( FILE *stream, unsigned nperline, unsigned linewidth );
Pascal/Delphiuses VFstd;
procedure VF_fhexprint( var Stream:Text; X:fVector; size:UIntSize; nperline, linewidth:UInt );
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_fhexprint( FILE *stream, fVector d_X, ui size, unsigned nperline, unsigned linewidth );
int cudaVF_fhexprint_buf( FILE *stream, fVector d_X, ui size, unsigned nperline, unsigned linewidth, fVector h_Wk );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_fhexprint( var Stream:Text; d_X:fVector; size:UIntSize; nperline, linewidth:UInt ): IntBool;
function cudaVF_fhexprint_buf( var Stream:Text; d_X:fVector; size:UIntSize; nperline, linewidth:UInt; h_Wk:fVector ): IntBool;
Descriptionsize elements of X are written in hexadecimal format to stream, nperline in each line of linewidth characters.

Printing starts always with a new line. This may lead to an empty line at the beginning. Especially the first line of a file is reserved for a possible headline.

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}.
 

CUDA versions only:cudaV?_fhexprint_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?_fhexprint to allocate its own buffer memory, cudaV?_fhexprint_buf is slightly faster.
 
Error handlingif nperline exceeds the maximum number of entries possible for the linewidth chosen, 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_chexprint,   VF_hexprint,   VF_write,   VF_store,   fhexprintf

VectorLib Table of Contents  OptiVec home