fml  0.1-0
Fused Matrix Library
cpuhelpers Namespace Reference

CPU class helpers. More...

Functions

template<typename REAL_IN , typename REAL_OUT >
void cpu2cpu (const cpuvec< REAL_IN > &cpu_in, cpuvec< REAL_OUT > &cpu_out)
 Copy data from a CPU object to another. More...
 
template<typename REAL >
cpuvec< REAL > cpu2cpu (const cpuvec< REAL > &cpu_in)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename REAL_IN , typename REAL_OUT >
void cpu2cpu (const cpumat< REAL_IN > &cpu_in, cpumat< REAL_OUT > &cpu_out)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename REAL >
cpumat< REAL > cpu2cpu (const cpumat< REAL > &cpu_in)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Detailed Description

CPU class helpers.

Function Documentation

◆ cpu2cpu()

template<typename REAL_IN , typename REAL_OUT >
void cpuhelpers::cpu2cpu ( const cpuvec< REAL_IN > &  cpu_in,
cpuvec< REAL_OUT > &  cpu_out 
)

Copy data from a CPU object to another.

Parameters
[in]cpu_inInput data.
[out]cpu_outOutput. Dimensions should match those of the input data. If not, the matrix will automatically be resized.
Memory Allocations\n If the output dimensions do not match those of the input, the
internal data will automatically be re-allocated.
Exceptions\n If a reallocation is triggered and fails, a bad_alloc exception
will be thrown.
Template Parameters
REAL_IN,REAL_OUTShould be float or double. They do not have to be the same type.