MF_fhexprint
| MD_fhexprint |
ME_fhexprint |
MCF_fhexprint |
MCD_fhexprint |
MCE_fhexprint |
MI_fhexprint | MBI_fhexprint | MSI_fhexprint | MLI_fhexprint | MQI_fhexprint |
MU_fhexprint | MUB_fhexprint | MUS_fhexprint | MUL_fhexprint | MUQ_fhexprint |
|
Function | print a matrix in hexadecimal format to a stream |
|
Syntax C/C++ | #include <MFstd.h>
void MF_fhexprint( FILE *stream, fMatrix MA, ui ht, ui len, unsigned linewidth ); |
C++ MatObj | #include <OptiVec.h>
void matrix<T>::fhexprint( FILE *stream, unsigned linewidth ); |
Pascal/Delphi | uses MFstd;
procedure MF_fhexprint( var Stream:TextFile; MA:fMatrix; ht, len:UIntSize; linewidth:UInt );
|
|
CUDA function C/C++ | #include <cudaMFstd.h>
int cudaMF_fhexprint( FILE *stream, fMatrix d_MA, ui ht, ui len );
int cudaMF_fhexprint_buf( FILE *stream, fMatrix d_MA, ui ht, ui len, fVector h_Wk );
|
CUDA function Pascal/Delphi | uses MFstd;
function cudaMF_fhexprint( var Stream:TextFile; d_MA:fMatrix; ht, len:UIntSize ): IntBool; function cudaMF_fhexprint_buf( var Stream:TextFile; d_MA:fMatrix; ht, len:UIntSize; h_Wk:fVector ): IntBool;
|
|
Description | The matrix MA is written in hexadecimal format to stream. Each line corresponds to one row of the matrix. The lines are numbered. If the specified linewidth is too small to write all columns, rows are cut off.
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.
Cartesian complex numbers are printed in braces, with the real and imaginary parts separated by a komma: {Re, Im}.
CUDA versions only: cudaM?_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 d_MA, i.e. ht*len. By avoiding the need of cudaM?_fhexprint to allocate its own buffer memory, cudaM?_fhexprint_buf is slightly faster.
|
|
Error handling | If len 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 truncates the rows at the maximum number of columns possible.
|
|
|