MF_matrix
| MD_matrix |
ME_matrix |
MCF_matrix |
MCD_matrix |
MCE_matrix |
MI_matrix | MBI_matrix | MSI_matrix | MLI_matrix | MQI_matrix |
MU_matrix | MUB_matrix | MUS_matrix | MUL_matrix | MUQ_matrix; |
|
Function | Memory allocation for a matrix |
|
Syntax C/C++ | #include <MFstd.h>
fMatrix MF_matrix( ui ht, ui len ); |
Pascal/Delphi | uses MFstd;
function MF_matrix( ht, len:UIntSize ): fMatrix; |
|
CUDA function C/C++ | #include <cudaMFstd.h>
fMatrix cudaMF_matrix( ui ht, ui len );
|
CUDA function Pascal/Delphi | uses MFstd;
function cudaMF_matrix( ht, len:UIntSize ): fMatrix;
|
|
Description | Based on memory model and environment, the most appropriate allocation procedure is chosen by these functions. Failure to allocate memory always leads to an error message and a subsequent program abort (similar to the error handling of the "new" operator). To release the memory thus allocated, M_free, M_nfree, or V_freeAll should be used (M_nfree only in C/C++).
For matrices generated by cudaM?_matrix, use cudaM_free, cudaM_nfree, or cudaV_freeAll.
Note: the declaration of a matrix (e.g., as fMatrix) reserves only a name, but no memory!
See chapter 4.1 if you are interested in details of the implementation.
|
|
Error handling | If there is not enough memory available, or if size is zero, an error message "Not enough memory" is displayed and the program aborted.
32-bit:
If more than 4 GB of memory are requested, an error message "Vector > 4 GB not possible" is displayed and the program aborted. If already a single matrix dimensions exceeds this limit, an error message "Invalid matrix dimension(s)" is displayed and the program aborted. |
|
Return value | C/C++: Pointer to the array of row pointers
Pascal/Delphi: Pointer to the allocated memory |
|
|