AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::slam::policies::CompileTimeValue< V, Tag > Class Template Reference

Shared core for a compile-time-known scalar value policy. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/slam/policies/ValuePolicies.hpp>

Inheritance diagram for axom::slam::policies::CompileTimeValue< V, Tag >:

Public Types

using TagType = Tag
 
using IntType = decltype(V)
 

Public Member Functions

constexpr AXOM_HOST_DEVICE CompileTimeValue (IntType val=V)
 
constexpr AXOM_HOST_DEVICE IntType value () const
 
constexpr IntType operator() () const
 
constexpr bool isValid (bool) const
 

Static Public Attributes

static constexpr IntType VALUE = V
 

Detailed Description

template<auto V, typename Tag>
class axom::slam::policies::CompileTimeValue< V, Tag >

Shared core for a compile-time-known scalar value policy.

The value V is fixed at compile time. The (defaulted) constructor argument exists only to satisfy the uniform policy-construction interface and is asserted to match V.

Provides the generic value() accessor, operator(), and an isValid() delegating to the tag's predicate. Leaf policies derive from this and add their named accessor.

Template Parameters
Vthe compile-time value (its type is the policy's IntType).
Taga value-policy tag carrying the default value and validity predicate.

Member Typedef Documentation

◆ TagType

template<auto V, typename Tag >
using axom::slam::policies::CompileTimeValue< V, Tag >::TagType = Tag

◆ IntType

template<auto V, typename Tag >
using axom::slam::policies::CompileTimeValue< V, Tag >::IntType = decltype(V)

Constructor & Destructor Documentation

◆ CompileTimeValue()

template<auto V, typename Tag >
constexpr AXOM_HOST_DEVICE axom::slam::policies::CompileTimeValue< V, Tag >::CompileTimeValue ( IntType  val = V)
inlineconstexpr

Member Function Documentation

◆ value()

template<auto V, typename Tag >
constexpr AXOM_HOST_DEVICE IntType axom::slam::policies::CompileTimeValue< V, Tag >::value ( ) const
inlineconstexpr

◆ operator()()

template<auto V, typename Tag >
constexpr IntType axom::slam::policies::CompileTimeValue< V, Tag >::operator() ( ) const
inlineconstexpr

◆ isValid()

template<auto V, typename Tag >
constexpr bool axom::slam::policies::CompileTimeValue< V, Tag >::isValid ( bool  ) const
inlineconstexpr

Member Data Documentation

◆ VALUE

template<auto V, typename Tag >
constexpr IntType axom::slam::policies::CompileTimeValue< V, Tag >::VALUE = V
staticconstexpr

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