VF_chexprint | VD_chexprint | VE_chexprint |
VCF_chexprint | VCD_chexprint | VCE_chexprint |
VPF_chexprint | VPD_chexprint | VPE_chexprint |
VI_chexprint | VBI_chexprint | VSI_chexprint | VLI_chexprint | VQI_chexprint | |
VU_chexprint | VUB_chexprint | VUS_chexprint | VUL_chexprint | VUQ_chexprint | VUI_chexprint |
|
Function | print a vector in hexadecimal format to the screen. Only for console applications |
|
Syntax C/C++ | #include <VFstd.h>
void VF_chexprint( fVector X, ui size, unsigned nperline ); |
C++ VecObj | #include <OptiVec.h>
void vector<T>::chexprint( unsigned nperline ); |
Pascal/Delphi | uses VFstd;
procedure VF_chexprint( X:fVector; size:UIntSize; nperline:UInt ); |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_chexprint( fVector d_X, ui size, unsigned nperline );
int cudaVF_chexprint_buf( fVector d_X, ui size, unsigned nperline, fVector h_Wk );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_chexprint( d_X:fVector; size:UIntSize; nperline:UInt ): IntBool;
function cudaVF_chexprint_buf( d_X:fVector; size:UIntSize; nperline:UInt; h_Wk:fVector ): IntBool;
|
|
Description | Windows with MS Visual C++ or Borland / Embarcadero compilers:
size elements of X are printed in hexadecimal format 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.
This family of functions is available only for console applications. |
CUDA versions only: | cudaV?_chexprint_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?_chexprint to allocate its own buffer memory, cudaV?_chexprint_buf is slightly faster. |
Other Windows compilers as well as Linux: |
As here the width and height of the text window are not easily available, calls to V?_chexprint are redirected to V?_hexprint. |
GCC Windows specific: | While VE_cprint, VCE_cprint, VPE_cprint truncate the long double input numbers to double precision and range, VE_chexprint, VCE_chexprint, and VPE_chexprint work in full 80-bit accuracy. |
|
Error handling | If 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.
|
|
|
|