|
Mila 0.13.48
Deep Neural Network Library
|
Functions | |
| template<TensorDataType TDataType> | |
| void | copyHostToHostImpl (const void *src_data, void *dst_data, size_t count) |
| Fast raw-memory copy for host-accessible tensors of same abstract type. | |
| template<TensorDataType TSrcDataType, TensorDataType TDstDataType> | |
| void | copyHostToHostWithConversionImpl (const void *src_data, void *dst_data, size_t count) |
| Element-wise host copy with conversion between abstract data types. | |
|
inline |
Fast raw-memory copy for host-accessible tensors of same abstract type.
Copies count logical elements from src_data to dst_data using a byte-wise memcpy based on the abstract element size for TDataType.
| TDataType | Abstract tensor data type for src and dst |
| src_data | Pointer to source memory (may be null) |
| dst_data | Pointer to destination memory (may be null) |
| count | Number of logical elements to copy |


|
inline |
Element-wise host copy with conversion between abstract data types.
Copies count logical elements from src_data (type TSrcDataType) to dst_data (type TDstDataType) performing a per-element conversion via static_cast to the native CPU types.
If the source and destination abstract types are the same, this forwards to copyHostToHostImpl.
| TSrcDataType | Abstract source tensor data type |
| TDstDataType | Abstract destination tensor data type |
| src_data | Pointer to source memory (may be null) |
| dst_data | Pointer to destination memory (may be null) |
| count | Number of logical elements to convert and copy |

