VF_hexprint | VD_hexprint | VE_hexprint |
VCF_hexprint | VCD_hexprint | VCE_hexprint |
VI_hexprint | VBI_hexprint | VSI_hexprint | VLI_hexprint | VQI_hexprint | |
VU_hexprint | VUB_hexprint | VUS_hexprint | VUL_hexprint | VUQ_hexprint | VUI_hexprint |
|
Function | Print a vector in hexadecimal format to stdout. Only for console applications. |
|
Syntax C/C++ | #include <VFstd.h>
void VF_hexprint( fVector X, ui size, unsigned nperline ); |
C++ VecObj | #include <OptiVec.h>
void vector<T>::hexprint( unsigned nperline ); |
Pascal/Delphi | uses VFstd;
procedure VF_hexprint( X:fVector; size:UIntSize; nperline:UInt ); |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_hexprint( fVector d_X, ui size, unsigned nperline );
int cudaVF_hexprint_buf( fVector d_X, ui size, unsigned nperline, fVector h_Wk );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_hexprint( d_X:fVector; size:UIntSize; nperline:UInt ): IntBool;
function cudaVF_hexprint_buf( d_X:fVector; size:UIntSize; nperline:UInt; h_Wk:fVector ): IntBool;
|
|
Description | size elements of X are printed to stdout in hexadecimal format, nperline in each line. or in the unit VecLib with a default value of 150 characters.
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 hexprinted 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_chexprint, no paging is performed.
This family of functions can be used only for console applications. |
|
Error handling | If nperline exceeds the maximum number of entries possible within V_consoleWindowWidth, 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?_hexprint_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?_hexprint to allocate its own buffer memory, cudaV?_hexprint_buf is slightly faster. |
|
|
|