MF_cprint MD_cprint ME_cprint
MCF_cprint MCD_cprint MCE_cprint
Functionprint a matrix to the screen (console applications only)
Syntax C/C++#include <MFstd.h>
void MF_cprint( fMatrix MA, ui ht, ui len );
C++ MatObj#include <OptiVec.h>
void matrix<T>::cprint();
Pascal/Delphiuses MFstd;
procedure MF_cprint( MA:fMatrix; ht, len:UIntSize );
CUDA function C/C++#include <cudaMFstd.h>
int cudaMF_cprint( fMatrix d_MA, ui ht, ui len );
int cudaMF_cprint_buf( fMatrix d_MA, ui ht, ui len, fVector h_Wk );
CUDA function Pascal/Delphiuses MFstd;
function cudaMF_cprint( d_MA:fMatrix; ht, len:UIntSize ): IntBool;
function cudaMF_cprint_buf( d_MA:fMatrix; ht, len:UIntSize; h_Wk:fVector ): IntBool;
DescriptionWindows with Borland / Embarcadero compilers or MS Visual C++, DLL runtime:
The matrix MA is printed to the screen. Each line corresponds to one row of the matrix. The lines are numbered. If necessary, rows are cut off at the screen boundaries. If there are more rows than screen lines, proper paging is applied.

This family of functions is available only for console applications.

CUDA versions only: cudaM?_cprint_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?_cprint to allocate its own buffer memory, cudaM?_cprint_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?_cprint are redirected to MF_print.
The same is true for Visual C++ with static runtime (here for the reason of version-to-version incompatibilities).
GCC Windows specific:In principle, the Windows port of GCC supports the 80-bit floating point type long double. However, the I/O routines rely on the runtime libraries of Visual C++, where 80-bit reals have disappeared a long time ago. This means that ME_cprint and MPE_cprint work only with double precision and, more importantly, within double range. Input numbers outside double range are treated as ±DBL_MAX. There is, however, a possibility to get a full-accuracy readout at least in hexadecimal format. To this end, call ME_chexprint etc.
Error handlingIf the number of columns 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 rows are truncated.
See alsoMF_fprint,   MF_chexprint,   VF_cprint,   chapter 14

MatrixLib Table of Contents  OptiVec home