Print the array to a string instead of the screen.
More...
|
| void | toString (char **output, const char *exp, const array &arr, const int precision=4, const bool transpose=true) |
| |
| const char * | toString (const char *exp, const array &arr, const int precision=4, const bool transpose=true) |
| |
| af_err | af_array_to_string (char **output, const char *exp, const af_array arr, const int precision, const bool transpose) |
| |
Print the array to a string instead of the screen.
This function is similar to af::print, except that it prints to a string rather than to screen.
◆ af_array_to_string()
| af_err af_array_to_string |
( |
char ** | output, |
|
|
const char * | exp, |
|
|
const af_array | arr, |
|
|
const int | precision, |
|
|
const bool | transpose ) |
- Parameters
-
| [out] | output | is the pointer to the c-string that will hold the data. The memory for output is allocated by the function. The user is responsible for deleting the memory. |
| [in] | exp | is an expression, generally the name of the array |
| [in] | arr | is the input array |
| [in] | precision | is the precision length for display |
| [in] | transpose | determines whether or not to transpose the array before storing it in the string |
◆ toString() [1/2]
| void toString |
( |
char ** | output, |
|
|
const char * | exp, |
|
|
const array & | arr, |
|
|
const int | precision = 4, |
|
|
const bool | transpose = true ) |
- Parameters
-
| [out] | output | is the pointer to the c-string that will hold the data. The memory for output is allocated by the function. The user is responsible for deleting the memory using af::freeHost() or af_free_host(). |
| [in] | exp | is an expression, generally the name of the array |
| [in] | arr | is the input array |
| [in] | precision | is the precision length for display |
| [in] | transpose | determines whether or not to transpose the array before storing it in the string |
◆ toString() [2/2]
| const char * toString |
( |
const char * | exp, |
|
|
const array & | arr, |
|
|
const int | precision = 4, |
|
|
const bool | transpose = true ) |
- Parameters
-
| [in] | exp | is an expression, generally the name of the array |
| [in] | arr | is the input array |
| [in] | precision | is the precision length for display |
| [in] | transpose | determines whether or not to transpose the array before storing it in the string |
- Returns
- output is the pointer to the c-string that will hold the data. The memory for output is allocated by the function. The user is responsible for deleting the memory using af::freeHost() or af_free_host().