T-SIMD v31.1.0
A C++ template SIMD library
Loading...
Searching...
No Matches
Print

Description

Functions to print the elements of a Vec.

Functions

template<typename T , size_t SIMD_WIDTH>
static void simd::fprint (FILE *f, const char *format, const char *separator, const Vec< T, SIMD_WIDTH > &vec)
 Writes the formatted elements of a Vec to a file separated by a separator string.
 
template<typename T , size_t SIMD_WIDTH>
static void simd::fprint (FILE *f, const char *format, const Vec< T, SIMD_WIDTH > &vec)
 Writes the formatted elements of a Vec to a file.
 
template<typename T , size_t SIMD_WIDTH>
static void simd::print (const char *format, const char *separator, const Vec< T, SIMD_WIDTH > &vec)
 Writes the formatted elements of a Vec to stdout separated by a separator string.
 
template<typename T , size_t SIMD_WIDTH>
static void simd::print (const char *format, const Vec< T, SIMD_WIDTH > &vec)
 Writes the formatted elements of a Vec to stdout.
 

Function Documentation

◆ fprint() [1/2]

template<typename T , size_t SIMD_WIDTH>
static void simd::fprint ( FILE * f,
const char * format,
const char * separator,
const Vec< T, SIMD_WIDTH > & vec )
inlinestatic

Writes the formatted elements of a Vec to a file separated by a separator string.

Equivalent to calling fprint(FILE *f, const char *format, const Vec<T,SIMD_WIDTH> &vec) with a format string consisting of the format string and the separator string.

Parameters
ffile to write to
formatformat string Must be a valid format string to print a single element of the Vec using the fprintf function of the C standard library
separatorseparator string
vecVec to print

◆ fprint() [2/2]

template<typename T , size_t SIMD_WIDTH>
static void simd::fprint ( FILE * f,
const char * format,
const Vec< T, SIMD_WIDTH > & vec )
inlinestatic

Writes the formatted elements of a Vec to a file.

The elements are formatted using the format string and written to the file using the fprintf function of the C standard library in the order they are stored in memory.

Parameters
ffile to write to
formatformat string Must be a valid format string to print a single element of the Vec using the fprintf function of the C standard library
vecVec to print

◆ print() [1/2]

template<typename T , size_t SIMD_WIDTH>
static void simd::print ( const char * format,
const char * separator,
const Vec< T, SIMD_WIDTH > & vec )
inlinestatic

Writes the formatted elements of a Vec to stdout separated by a separator string.

Equivalent to calling fprint(FILE *f, const char *format, const char *separator, const Vec<T,SIMD_WIDTH> &vec) with stdout as the file.

Parameters
formatformat string Must be a valid format string to print a single element of the Vec using the fprintf function of the C standard library
separatorseparator string
vecVec to print

◆ print() [2/2]

template<typename T , size_t SIMD_WIDTH>
static void simd::print ( const char * format,
const Vec< T, SIMD_WIDTH > & vec )
inlinestatic

Writes the formatted elements of a Vec to stdout.

Equivalent to calling fprint(FILE *f, const char *format, const Vec<T,SIMD_WIDTH> &vec) with stdout as the file.

Parameters
formatformat string Must be a valid format string to print a single element of the Vec using the fprintf function of the C standard library
vecVec to print