RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
RAJA::detail::AsIntegerArray< T, min_integer_type_size, max_integer_type_size > Struct Template Reference

Abstracts T into an equal or greater size array of integers whose size is between min_integer_type_size and max_interger_type_size inclusive. More...

#include <types.hpp>

Public Types

using integer_type = std::conditional_t<((alignof(T) >=alignof(unsigned long long) &&sizeof(unsigned long long)<=max_integer_type_size)||sizeof(unsigned long)< min_integer_type_size), unsigned long long, std::conditional_t<((alignof(T) >=alignof(unsigned long) &&sizeof(unsigned long)<=max_integer_type_size)||sizeof(unsigned int)< min_integer_type_size), unsigned long, std::conditional_t<((alignof(T) >=alignof(unsigned int) &&sizeof(unsigned int)<=max_integer_type_size)||sizeof(unsigned short)< min_integer_type_size), unsigned int, std::conditional_t<((alignof(T) >=alignof(unsigned short) &&sizeof(unsigned short)<=max_integer_type_size)||sizeof(unsigned char)< min_integer_type_size), unsigned short, std::conditional_t<((alignof(T) >=alignof(unsigned char) &&sizeof(unsigned char)<=max_integer_type_size)), unsigned char, void > >> >>
 

Public Member Functions

 AsIntegerArray ()=default
 
constexpr RAJA_HOST_DEVICE size_t array_size () const
 
RAJA_HOST_DEVICEget_value () const
 
RAJA_HOST_DEVICE void set_value (T value)
 

Public Attributes

integer_type array [num_integer_type] = {0}
 

Static Public Attributes

static constexpr size_t num_integer_type
 

Detailed Description

template<typename T, size_t min_integer_type_size = 1, size_t max_integer_type_size = sizeof(unsigned long long)>
struct RAJA::detail::AsIntegerArray< T, min_integer_type_size, max_integer_type_size >

Abstracts T into an equal or greater size array of integers whose size is between min_integer_type_size and max_interger_type_size inclusive.

Member Typedef Documentation

◆ integer_type

template<typename T , size_t min_integer_type_size = 1, size_t max_integer_type_size = sizeof(unsigned long long)>
using RAJA::detail::AsIntegerArray< T, min_integer_type_size, max_integer_type_size >::integer_type = std::conditional_t< ((alignof(T) >= alignof(unsigned long long) && sizeof(unsigned long long) <= max_integer_type_size) || sizeof(unsigned long) < min_integer_type_size), unsigned long long, std::conditional_t< ((alignof(T) >= alignof(unsigned long) && sizeof(unsigned long) <= max_integer_type_size) || sizeof(unsigned int) < min_integer_type_size), unsigned long, std::conditional_t< ((alignof(T) >= alignof(unsigned int) && sizeof(unsigned int) <= max_integer_type_size) || sizeof(unsigned short) < min_integer_type_size), unsigned int, std::conditional_t< ((alignof(T) >= alignof(unsigned short) && sizeof(unsigned short) <= max_integer_type_size) || sizeof(unsigned char) < min_integer_type_size), unsigned short, std::conditional_t<((alignof(T) >= alignof(unsigned char) && sizeof(unsigned char) <= max_integer_type_size)), unsigned char, void> >> >>

Constructor & Destructor Documentation

◆ AsIntegerArray()

template<typename T , size_t min_integer_type_size = 1, size_t max_integer_type_size = sizeof(unsigned long long)>
RAJA::detail::AsIntegerArray< T, min_integer_type_size, max_integer_type_size >::AsIntegerArray ( )
default

Member Function Documentation

◆ array_size()

template<typename T , size_t min_integer_type_size = 1, size_t max_integer_type_size = sizeof(unsigned long long)>
constexpr RAJA_HOST_DEVICE size_t RAJA::detail::AsIntegerArray< T, min_integer_type_size, max_integer_type_size >::array_size ( ) const
inlineconstexpr

◆ get_value()

template<typename T , size_t min_integer_type_size = 1, size_t max_integer_type_size = sizeof(unsigned long long)>
RAJA_HOST_DEVICE T RAJA::detail::AsIntegerArray< T, min_integer_type_size, max_integer_type_size >::get_value ( ) const
inline

◆ set_value()

template<typename T , size_t min_integer_type_size = 1, size_t max_integer_type_size = sizeof(unsigned long long)>
RAJA_HOST_DEVICE void RAJA::detail::AsIntegerArray< T, min_integer_type_size, max_integer_type_size >::set_value ( value)
inline

Member Data Documentation

◆ num_integer_type

template<typename T , size_t min_integer_type_size = 1, size_t max_integer_type_size = sizeof(unsigned long long)>
constexpr size_t RAJA::detail::AsIntegerArray< T, min_integer_type_size, max_integer_type_size >::num_integer_type
staticconstexpr
Initial value:
=
(sizeof(T) + sizeof(integer_type) - 1) / sizeof(integer_type)
std::conditional_t<((alignof(T) >=alignof(unsigned long long) &&sizeof(unsigned long long)<=max_integer_type_size)||sizeof(unsigned long)< min_integer_type_size), unsigned long long, std::conditional_t<((alignof(T) >=alignof(unsigned long) &&sizeof(unsigned long)<=max_integer_type_size)||sizeof(unsigned int)< min_integer_type_size), unsigned long, std::conditional_t<((alignof(T) >=alignof(unsigned int) &&sizeof(unsigned int)<=max_integer_type_size)||sizeof(unsigned short)< min_integer_type_size), unsigned int, std::conditional_t<((alignof(T) >=alignof(unsigned short) &&sizeof(unsigned short)<=max_integer_type_size)||sizeof(unsigned char)< min_integer_type_size), unsigned short, std::conditional_t<((alignof(T) >=alignof(unsigned char) &&sizeof(unsigned char)<=max_integer_type_size)), unsigned char, void > >> >> integer_type
Definition: types.hpp:989

◆ array

template<typename T , size_t min_integer_type_size = 1, size_t max_integer_type_size = sizeof(unsigned long long)>
integer_type RAJA::detail::AsIntegerArray< T, min_integer_type_size, max_integer_type_size >::array[num_integer_type] = {0}

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