MF_fhexprint MD_fhexprint ME_fhexprint
MCF_fhexprint MCD_fhexprint MCE_fhexprint
MI_fhexprintMBI_fhexprintMSI_fhexprintMLI_fhexprintMQI_fhexprint
MU_fhexprintMUB_fhexprintMUS_fhexprintMUL_fhexprintMUQ_fhexprint
Functionprint 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/Delphiuses 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/Delphiuses 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;
DescriptionThe 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 handlingIf 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.
See alsoMF_cprint,   MF_fhexprint,   chapter 14

MatrixLib Table of Contents  OptiVec home