MF_print MD_print ME_print
MCF_print MCD_print MCE_print
Functionprint a matrix in ASCII format to stdout (Console applications only)
Syntax C/C++#include <MFstd.h>
void MF_print( fMatrix MA, ui ht, ui len );
C++ MatObj#include <OptiVec.h>
void matrix<T>::print();
Pascal/Delphiuses MFstd;
procedure MF_print( MA:fMatrix; ht, len:UIntSize );
CUDA function C/C++#include <cudaMFstd.h>
int cudaMF_print( fMatrix d_MA, ui ht, ui len );
int cudaMF_print_buf( fMatrix d_MA, ui ht, ui len, fVector h_Wk );
CUDA function Pascal/Delphiuses MFstd;
function cudaMF_print( d_MA:fMatrix; ht, len:UIntSize ): IntBool;
function cudaMF_print_buf( d_MA:fMatrix; ht, len:UIntSize; h_Wk:fVector ): IntBool;
DescriptionThe matrix MA is written to stream. Each line corresponds to one row of the matrix. The lines are numbered.
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;
If this linewidth is too small to write all columns, rows are cut off.
Cartesian complex numbers are printed in braces, with the real and imaginary parts separated by a komma: {Re, Im}.

In contrast to MF_write, it is not possible to override the automatic choice of the format used for printing. The number of digits per element is determined by the available space, which depends in turn on the parameter len.

In contrast to MF_cprint, no paging is performed.
This family of functions can be used only in console applications.

CUDA versions only: cudaM?_print_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?_print to allocate its own buffer memory, cudaM?_print_buf is slightly faster.

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_print and MCE_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.
See alsoVF_print,   MF_cprint,   MF_hexprint,   MF_fprint,   chapter 14

MatrixLib Table of Contents  OptiVec home