Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
TensorDataTypeMap.ixx File Reference

Concrete C++ type to abstract TensorDataType mapping utilities. More...

#include <type_traits>
#include <cstdint>
import Dnn.TensorDataType;

Classes

struct  Mila::Dnn::dependent_false< T >
struct  Mila::Dnn::TensorDataTypeMap< TElementType >
 Primary template for mapping concrete C++ types to TensorDataType. More...
struct  Mila::Dnn::TensorDataTypeMap< float >
 Concrete type mapping for float (FP32). More...
struct  Mila::Dnn::TensorDataTypeMap< std::int16_t >
 Concrete type mapping for 16-bit signed integer. More...
struct  Mila::Dnn::TensorDataTypeMap< std::int32_t >
 Concrete type mapping for 32-bit signed integer. More...
struct  Mila::Dnn::TensorDataTypeMap< std::int8_t >
 Concrete type mapping for 8-bit signed integer. More...
struct  Mila::Dnn::TensorDataTypeMap< std::uint16_t >
 Concrete type mapping for 16-bit unsigned integer. More...
struct  Mila::Dnn::TensorDataTypeMap< std::uint32_t >
 Concrete type mapping for 32-bit unsigned integer. More...
struct  Mila::Dnn::TensorDataTypeMap< std::uint8_t >
 Concrete type mapping for 8-bit unsigned integer. More...

Namespaces

namespace  Mila
 Mila main API namespace.
namespace  Mila::Dnn

Detailed Description

Concrete C++ type to abstract TensorDataType mapping utilities.

This module provides a minimal, explicit mapping from concrete C++ element types to the abstract TensorDataType enumeration. It is used by migration and helper utilities that must convert a concrete element type into the corresponding abstract TensorDataType value (for example, when adapting legacy APIs or performing compile-time dispatch).

Key notes:

  • The primary template emits a clear compile-time diagnostic for unsupported concrete types; only provided specializations are valid.
  • This mapping is a small migration helper and not intended to replace the canonical TensorDataTypeTraits which defines per-enum compile-time traits.