FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches
Utilities

Non-domain-specific infrastructure. More...

Modules

 Profiling
 Markers for categorizing performance measurements.
 
 Filling Curves
 Space-filling curve, key generators.
 
 KDTree
 KDTree based search utilities.
 
 Point
 Spatial representation of a point based on dimensioned_array.
 
 MPI
 These require MPI tasks, not the MPI backend.
 
 Serialization
 Serialization without default constructibility.
 
 Unit Testing
 Unit test framework much like Google Test but with task support.
 
 Ranges
 Range and iterator tools, mostly backported from the standard library.
 

Classes

struct  dag< NodePolicy >
 Basic DAG type. More...
 
class  dimensioned_array< TYPE, DIMENSION, NAMESPACE >
 The dimensioned_array type provides a general base for defining contiguous array types that have a specific dimension. More...
 
struct  equal_map
 A partition with substrings of equal size. More...
 
struct  identity
 Interpret a type as itself in functional contexts. More...
 
struct  map_base< D >
 A partition of some prefix of the whole numbers into substrings. More...
 
struct  offsets
 A partition with substrings of arbitrary size. More...
 
struct  Symbol< S >
 Dummy class template. More...
 

Macros

#define FLECSI_DEVICE_CODE
 Specify if the code is being built on GPU.
 
#define FLECSI_INLINE_TARGET
 Make a function inline and available on a GPU.
 
#define FLECSI_TARGET
 Make a function available on a GPU.
 

Typedefs

using Dimension = unsigned short
 Type for spatial dimensions and counts thereof.
 
using gid = FLECSI_GID_TYPE
 Global topology entity ID type.
 
using id = FLECSI_ID_TYPE
 Local (color-specific) topology entity ID type.
 

Functions

std::string demangle (const char *const name)
 Return the demangled name.
 
template<class InputIt1 , class InputIt2 >
bool intersects (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2)
 Detect intersections of sorted lists.
 
template<typename TYPE , Dimension DIMENSION, std::size_t NAMESPACE>
constexpr dimensioned_array< TYPE, DIMENSION, NAMESPACE > operator+ (const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &lhs, const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &rhs)
 Addition operator.
 
template<typename TYPE , Dimension DIMENSION, std::size_t NAMESPACE>
constexpr dimensioned_array< TYPE, DIMENSION, NAMESPACE > operator- (const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &lhs, const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &rhs)
 Addition operator.
 
template<typename TYPE , Dimension DIMENSION, std::size_t NAMESPACE>
std::ostream & operator<< (std::ostream &stream, dimensioned_array< TYPE, DIMENSION, NAMESPACE > const &a)
 Addition operator.
 
template<typename order_iterator , typename value_iterator >
void reorder (const order_iterator order_begin, const order_iterator order_end, const value_iterator v)
 Reorders an array in place.
 
template<typename order_iterator , typename value_iterator >
void reorder_destructive (const order_iterator order_begin, const order_iterator order_end, const value_iterator v)
 Reorders an array in place.
 
template<class T >
std::set< T > set_difference (const std::set< T > &s1, const std::set< T > &s2)
 Convenience function wrapper around std::set_difference function.
 
template<class T >
std::set< T > set_intersection (const std::set< T > &s1, const std::set< T > &s2)
 Convenience function wrapper around std::set_intersection function.
 
template<class T >
std::set< T > set_union (const std::set< T > &s1, const std::set< T > &s2)
 Convenience function wrapper around std::set_union function.
 
template<auto & S>
std::string symbol ()
 Return the name of the template argument.
 
template<class T >
std::string type ()
 Return the demangled name of the type T.
 
std::string type (const std::type_info &type_info)
 Return the demangled name of the type identified by type_info.
 

Detailed Description

Non-domain-specific infrastructure.

#include "flecsi/utilities.hh"

This header provides the features in the following additional deprecated headers:

Macro Definition Documentation

◆ FLECSI_TARGET

#define FLECSI_TARGET

Make a function available on a GPU.

Use before a return type or a lambda's parameter list.

Warning
Many implementations impose severe restrictions on such functions. Most prominent is that they can call only other functions so annotated, preventing the use of much or all of many libraries (including the standard library). FleCSI documents certain classes and functions as being "supported for GPU execution".

◆ FLECSI_INLINE_TARGET

#define FLECSI_INLINE_TARGET

Make a function inline and available on a GPU.

See also
FLECSI_TARGET

◆ FLECSI_DEVICE_CODE

#define FLECSI_DEVICE_CODE

Specify if the code is being built on GPU.

Typedef Documentation

◆ Dimension

using Dimension = unsigned short

Type for spatial dimensions and counts thereof.

◆ id

using id = FLECSI_ID_TYPE

Local (color-specific) topology entity ID type.

Often provided in a index-space-specific convertible wrapper.

◆ gid

using gid = FLECSI_GID_TYPE

Global topology entity ID type.

Function Documentation

◆ demangle()

std::string demangle ( const char *const  name)

Return the demangled name.

Parameters
nameThe string to demangle.

◆ type() [1/2]

template<class T >
std::string type ( )

Return the demangled name of the type T.

Template Parameters
Tthe type (references and cv-qualification ignored)

◆ type() [2/2]

std::string type ( const std::type_info &  type_info)

Return the demangled name of the type identified by type_info.

◆ symbol()

template<auto & S>
std::string symbol ( )

Return the name of the template argument.

Template Parameters
areference to a function or variable
Returns
demangled name

◆ operator+()

template<typename TYPE , Dimension DIMENSION, std::size_t NAMESPACE>
constexpr dimensioned_array< TYPE, DIMENSION, NAMESPACE > operator+ ( const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &  lhs,
const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &  rhs 
)
constexpr

Addition operator.

Template Parameters
TYPEThe type of the array, e.g., P.O.D. type.
DIMENSIONThe dimension of the array, i.e., the number of elements to be stored in the array.
NAMESPACEThe namespace of the array. This is a dummy parameter that is useful for creating distinct types that alias dimensioned_array.

◆ operator-()

template<typename TYPE , Dimension DIMENSION, std::size_t NAMESPACE>
constexpr dimensioned_array< TYPE, DIMENSION, NAMESPACE > operator- ( const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &  lhs,
const dimensioned_array< TYPE, DIMENSION, NAMESPACE > &  rhs 
)
constexpr

Addition operator.

Template Parameters
TYPEThe type of the array, e.g., P.O.D. type.
DIMENSIONThe dimension of the array, i.e., the number of elements to be stored in the array.
NAMESPACEThe namespace of the array. This is a dummy parameter that is useful for creating distinct types that alias dimensioned_array.

◆ operator<<()

template<typename TYPE , Dimension DIMENSION, std::size_t NAMESPACE>
std::ostream & operator<< ( std::ostream &  stream,
dimensioned_array< TYPE, DIMENSION, NAMESPACE > const &  a 
)

Addition operator.

Template Parameters
TYPEThe type of the array, e.g., P.O.D. type.
DIMENSIONThe dimension of the array, i.e., the number of elements to be stored in the array.
NAMESPACEThe namespace of the array. This is a dummy parameter that is useful for creating distinct types that alias dimensioned_array.
Parameters
streamThe output stream.
aThe dimensioned array.

◆ reorder()

template<typename order_iterator , typename value_iterator >
void reorder ( const order_iterator  order_begin,
const order_iterator  order_end,
const value_iterator  v 
)

Reorders an array in place.

Remarks
this version maintains the order array
Parameters
[in]order_beginThe begin iterator for the order array
[in]order_endThe end iterator for the order array
[in,out]vThe begin iterator for the value array
Deprecated:
Unused.

◆ reorder_destructive()

template<typename order_iterator , typename value_iterator >
void reorder_destructive ( const order_iterator  order_begin,
const order_iterator  order_end,
const value_iterator  v 
)

Reorders an array in place.

Remarks
this version destroys the order array for performance gains
Parameters
[in,out]order_beginThe begin iterator for the order array
[in,out]order_endThe end iterator for the order array
[in,out]vThe begin iterator for the value array
Deprecated:
Unused.

◆ intersects()

template<class InputIt1 , class InputIt2 >
bool intersects ( InputIt1  first1,
InputIt1  last1,
InputIt2  first2,
InputIt2  last2 
)

Detect intersections of sorted lists.

Remarks
This function has complexity O(n + m)
Deprecated:
Unused.

◆ set_intersection()

template<class T >
std::set< T > set_intersection ( const std::set< T > &  s1,
const std::set< T > &  s2 
)

Convenience function wrapper around std::set_intersection function.

This version computes the intersection of two sets and returns the result as a set.

Parameters
s1The first set of the intersection.
s2The second set of the intersection.
Returns
A set containing the intersection of s1 with s2.
Deprecated:
Unused.

◆ set_union()

template<class T >
std::set< T > set_union ( const std::set< T > &  s1,
const std::set< T > &  s2 
)

Convenience function wrapper around std::set_union function.

This version computes the union of two sets and returns the result as a set.

Parameters
s1The first set of the union.
s2The second set of the union.
Returns
A set containing the union of s1 with s2.
Deprecated:
Unused.

◆ set_difference()

template<class T >
std::set< T > set_difference ( const std::set< T > &  s1,
const std::set< T > &  s2 
)

Convenience function wrapper around std::set_difference function.

This version computes the difference of two sets and returns the result as a set.

Parameters
s1The first set of the difference.
s2The second set of the difference.
Returns
A set containing the difference of s1 with s2.
Deprecated:
Unused.