VF_fhexprint | VD_fhexprint | VE_fhexprint |
VCF_fhexprint | VCD_fhexprint | VCE_fhexprint |
VPF_fhexprint | VPD_fhexprint | VPE_fhexprint |
VI_fhexprint | VBI_fhexprint | VSI_fhexprint | VLI_fhexprint | VQI_fhexprint | |
VU_fhexprint | VUB_fhexprint | VUS_fhexprint | VUL_fhexprint | VUQ_fhexprint | VUI_fhexprint |
|
Function | print 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/Delphi | uses 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/Delphi | uses 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;
|
|
Description | size 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 handling | if 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. |
|
|
|