Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::Compute::Cpu::ZeroOps Struct Referenceexport
Inheritance diagram for Mila::Dnn::Compute::Cpu::ZeroOps:

Static Public Member Functions

template<TensorDataType TDataType, typename TMemoryResource>
requires isValidTensor<TDataType, TMemoryResource>
static void zero (Tensor< TDataType, TMemoryResource > &tensor, IExecutionContext *exec_context=nullptr)
 Zero the contents of a CPU tensor buffer.

Member Function Documentation

◆ zero()

template<TensorDataType TDataType, typename TMemoryResource>
requires isValidTensor<TDataType, TMemoryResource>
void Mila::Dnn::Compute::Cpu::ZeroOps::zero ( Tensor< TDataType, TMemoryResource > & tensor,
IExecutionContext * exec_context = nullptr )
inlinestatic

Zero the contents of a CPU tensor buffer.

  • No-op for empty tensors.
  • Uses std::memset for contiguous, trivially-copyable native types.
  • ExecutionContext parameter is accepted for API uniformity but ignored on CPU.

Threading / sync: CPU path is synchronous.

Here is the call graph for this function:

The documentation for this struct was generated from the following file: