ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Static Public Attributes | List of all members
container::DataTypeToEnum< T > Struct Template Reference

Template struct for mapping a DataType to its corresponding enum value. More...

#include <tensor_types.h>

Collaboration diagram for container::DataTypeToEnum< T >:

Static Public Attributes

static constexpr DataType value = {}
 

Detailed Description

template<typename T>
struct container::DataTypeToEnum< T >

Template struct for mapping a DataType to its corresponding enum value.

Parameters
TThe DataType to map to its enum value.
Returns
The enumeration value corresponding to the data type. This method uses template specialization to map each supported data type to its corresponding enumeration value. If the template argument T is not a supported data type, this method will cause a compile-time error. Example usage: DataTypeToEnum<float>::value; // Returns DataType::DT_FLOAT

Member Data Documentation

◆ value

template<typename T >
constexpr DataType container::DataTypeToEnum< T >::value = {}
staticconstexpr

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