VTK-m  2.2
Classes | Namespaces | Macros | Typedefs | Functions
List.h File Reference
#include <vtkm/Types.h>
#include <vtkm/internal/Meta.h>
#include <functional>

Go to the source code of this file.

Classes

struct  vtkm::List< Ts >
 A template used to hold a list of types. More...
 

Namespaces

 vtkm
 Groups connected points that have the same field value.
 

Macros

#define VTKM_CHECK_LIST_SIZE(size)
 
#define VTKM_IS_LIST(type)
 Checks that the argument is a proper list. More...
 

Typedefs

using vtkm::ListEmpty = vtkm::List<>
 A convenience type for an empty list. More...
 
using vtkm::ListUniversal = vtkm::List< detail::UniversalTypeTag >
 A special type for a list that represents holding all potential values. More...
 
template<typename List >
using vtkm::ListSize = typename detail::ListSizeImpl< List >::type
 Becomes an std::integral_constant containing the number of types in a list. More...
 
template<typename List , template< typename... > class Target>
using vtkm::ListApply = typename detail::ListApplyImpl< List, Target >::type
 Applies the list of types to a template. More...
 
template<typename... Lists>
using vtkm::ListAppend = typename detail::ListAppendImpl< Lists... >::type
 Concatinates a set of lists into a single list. More...
 
template<typename T , vtkm::IdComponent N>
using vtkm::ListFill = typename detail::ListFillImpl< T, N >::type
 Returns a list filled with N copies of type T. More...
 
template<typename List , vtkm::IdComponent Index>
using vtkm::ListAt = typename detail::ListAtImpl< List, Index >::type
 Finds the type at the given index. More...
 
template<typename List , typename T >
using vtkm::ListIndexOf = typename detail::ListIndexOfImpl< List, T >::type
 Finds the index of a given type. More...
 
template<typename List , typename T >
using vtkm::ListHas = typename detail::ListHasImpl< List, T >::type
 Checks to see if the given T is in the list pointed to by List. More...
 
template<typename List , template< typename > class Transform>
using vtkm::ListTransform = typename detail::ListTransformImpl< List, Transform >::type
 Constructs a list containing all types in a source list applied to a transform template. More...
 
template<typename List , template< typename > class Predicate>
using vtkm::ListRemoveIf = typename detail::ListRemoveIfImpl< List, Predicate >::type
 Takes an existing List and a predicate template that is applied to each type in the List. More...
 
template<typename List1 , typename List2 >
using vtkm::ListIntersect = typename detail::ListIntersectImpl< List1, List2 >::type
 Constructs a list containing types present in all lists. More...
 
template<typename List1 , typename List2 >
using vtkm::ListCross = typename detail::ListCrossImpl< List1, List2 >::type
 Generates a list that is the cross product of two input lists. More...
 
template<typename List , template< typename T1, typename T2 > class Operator, typename Initial >
using vtkm::ListReduce = typename detail::ListReduceImpl< List, Operator, Initial >::type
 Reduces a list to a single type using an operator. More...
 
template<typename List , template< typename > class Predicate = vtkm::internal::meta::Identity>
using vtkm::ListAll = vtkm::ListReduce< vtkm::ListTransform< List, Predicate >, vtkm::internal::meta::And, std::true_type >
 Determines whether all the types in the list are "true.". More...
 
template<typename List , template< typename > class Predicate = vtkm::internal::meta::Identity>
using vtkm::ListAny = vtkm::ListReduce< vtkm::ListTransform< List, Predicate >, vtkm::internal::meta::Or, std::false_type >
 Determines whether any of the types in the list are "true.". More...
 

Functions

template<typename Functor , typename... Ts, typename... Args>
void vtkm::ListForEach (Functor &&f, vtkm::List< Ts... >, Args &&... args)
 For each typename represented by the list, call the functor with a default instance of that type. More...
 
template<typename Functor , typename... Args>
void vtkm::ListForEach (Functor &&, vtkm::ListEmpty, Args &&...)
 

Macro Definition Documentation

◆ VTKM_CHECK_LIST_SIZE

#define VTKM_CHECK_LIST_SIZE (   size)
Value:
static_assert((size) <= 512, \
"A vtkm::List with more than 512 elements is not supported." \
" A list this long is problematic for compilers." \
" Compilers often have a recursive template instantiation limit of around 1024," \
" so operations on lists this large can lead to confusing and misleading errors.")

◆ VTKM_IS_LIST

#define VTKM_IS_LIST (   type)
Value:
VTKM_STATIC_ASSERT_MSG((::vtkm::internal::IsList<type>::value), \
"Provided type is not a valid VTK-m list type.")

Checks that the argument is a proper list.

This is a handy concept check for functions and classes to make sure that a template argument is actually a device adapter tag. (You can get weird errors elsewhere in the code when a mistake is made.)

VTKM_STATIC_ASSERT_MSG
#define VTKM_STATIC_ASSERT_MSG(condition, message)
Definition: StaticAssert.h:18