IgANet
IGAnets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
dtype.hpp File Reference

DType traits. More...

#include <complex>
#include <cstddef>
#include <string_view>
#include <type_traits>
#include <iganet/core/core.hpp>

Go to the source code of this file.

Classes

struct  iganet::dtype_traits< bool >
 LibTorch dtype mapping for bool. More...
 
struct  iganet::dtype_traits< char >
 LibTorch dtype mapping for char. More...
 
struct  iganet::dtype_traits< double >
 LibTorch dtype mapping for double. More...
 
struct  iganet::dtype_traits< float >
 LibTorch dtype mapping for float. More...
 
struct  iganet::dtype_traits< half >
 LibTorch dtype mapping for half. More...
 
struct  iganet::dtype_traits< int >
 LibTorch dtype mapping for int. More...
 
struct  iganet::dtype_traits< long >
 LibTorch dtype mapping for long. More...
 
struct  iganet::dtype_traits< long long >
 LibTorch dtype mapping for long long. More...
 
struct  iganet::dtype_traits< short >
 LibTorch dtype mapping for short. More...
 
struct  iganet::dtype_traits< std::complex< double > >
 LibTorch dtype mapping for std::complex<double>. More...
 
struct  iganet::dtype_traits< std::complex< float > >
 LibTorch dtype mapping for std::complex<float>. More...
 
struct  iganet::dtype_traits< std::complex< half > >
 LibTorch dtype mapping for std::complex<half>. More...
 
struct  iganet::half
 Tag type representing IEEE 754 half-precision floating-point data. More...
 
struct  iganet::type_name< bool >
 Human-readable bool name for bool. More...
 
struct  iganet::type_name< char >
 Human-readable char name for char. More...
 
struct  iganet::type_name< char16_t >
 Human-readable char16_t name for char16_t. More...
 
struct  iganet::type_name< char32_t >
 Human-readable char32_t name for char32_t. More...
 
struct  iganet::type_name< char8_t >
 Human-readable char8_t name for char8_t. More...
 
struct  iganet::type_name< double >
 Human-readable double name for double. More...
 
struct  iganet::type_name< float >
 Human-readable float name for float. More...
 
struct  iganet::type_name< half >
 Human-readable half name for half. More...
 
struct  iganet::type_name< int >
 Human-readable int name for int. More...
 
struct  iganet::type_name< long >
 Human-readable long name for long. More...
 
struct  iganet::type_name< long double >
 Human-readable long double name for long double. More...
 
struct  iganet::type_name< long long >
 Human-readable long long name for long long. More...
 
struct  iganet::type_name< short >
 Human-readable short name for short. More...
 
struct  iganet::type_name< signed char >
 Human-readable signed char name for signed char. More...
 
struct  iganet::type_name< std::complex< double > >
 Human-readable type name for std::complex<double>. More...
 
struct  iganet::type_name< std::complex< float > >
 Human-readable type name for std::complex<float>. More...
 
struct  iganet::type_name< std::complex< half > >
 Human-readable type name for std::complex<half>. More...
 
struct  iganet::type_name< std::complex< long double > >
 Human-readable type name for std::complex<long double>. More...
 
struct  iganet::type_name< std::nullptr_t >
 Human-readable type name for std::nullptr_t. More...
 
struct  iganet::type_name< unsigned char >
 Human-readable unsigned char name for unsigned char. More...
 
struct  iganet::type_name< unsigned int >
 Human-readable unsigned int name for unsigned int. More...
 
struct  iganet::type_name< unsigned long >
 Human-readable unsigned long name for unsigned long. More...
 
struct  iganet::type_name< unsigned long long >
 Human-readable unsigned long long name for unsigned long long. More...
 
struct  iganet::type_name< unsigned short >
 Human-readable unsigned short name for unsigned short. More...
 
struct  iganet::type_name< void >
 Human-readable void name for void. More...
 
struct  iganet::type_name< wchar_t >
 Human-readable wchar_t name for wchar_t. More...
 

Namespaces

namespace  iganet
 

Concepts

concept  iganet::DType
 Concept to identify template parameters that are acceptable as DTypes.
 

Macros

#define DEFINE_DTYPE(type, torch_dtype)
 Defines a dtype_traits specialization.
 
#define DEFINE_TYPE_NAME(type)
 Defines a type_name specialization.
 

Typedefs

template<typename T >
using iganet::normalized_type_t = std::remove_cv_t< T >
 Removes top-level const and volatile qualifiers from a type.
 

Detailed Description

DType traits.

Author
Matthias Moller.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.


Class Documentation

◆ iganet::half

struct iganet::half

Tag type representing IEEE 754 half-precision floating-point data.

Macro Definition Documentation

◆ DEFINE_DTYPE

#define DEFINE_DTYPE (   type,
  torch_dtype 
)
Value:
\
template <> struct dtype_traits<type> { \
\
static constexpr torch::Dtype value = torch_dtype; \
}

Defines a dtype_traits specialization.

Parameters
typeC++ type to specialize.
torch_dtypeCorresponding LibTorch dtype constant.

◆ DEFINE_TYPE_NAME

#define DEFINE_TYPE_NAME (   type)
Value:
\
template <> \
struct type_name<type> { \
\
static constexpr std::string_view value = #type; \
}

Defines a type_name specialization.

Parameters
typeC++ type whose name is exposed.