Speclib  0.1.2
The library for writing better CUDA libraries
sp::f::Traits< Functor > Struct Template Referencefinal

Specifies the traits for a given functor. More...

#include <FunctorTraits.hpp>

Inheritance diagram for sp::f::Traits< Functor >:
[legend]

Additional Inherited Members

- Public Types inherited from sp::f::TraitsBase< Traits< Functor >, Functor >
using Functor = Functor
 The described functor. More...
 
using Inverse = void
 The inverse of this functor. More...
 
using GroupInverseOf = void
 The functor defining a group that this functor is an inverse of. More...
 
using UnaryGroupInverse = void
 The functor that acts as the unary inverse for this functor. More...
 
using BinaryGroupInverse = void
 The functor that acts as the binary inverse for this functor. More...
 
- Static Public Attributes inherited from sp::f::TraitsBase< Traits< Functor >, Functor >
static constexpr bool Total
 The function is defined for all input tuples (division is not). More...
 
static constexpr bool Even
 f(-x) = f(x). More...
 
static constexpr bool Odd
 f(-x) = -f(x). More...
 
static constexpr bool Associative
 f(f(a, b), c) = f(a, f(b, c)). More...
 
static constexpr bool Commutative
 f(a, b) = f(b, a). More...
 
static constexpr bool Anticommutative
 f(a, b) = -f(b, a). More...
 
static constexpr bool Invertible
 For all x, there exists y such that f(x, y) = f(y, x) = IdentityValue. More...
 
static constexpr bool HasIdentity
 The functor has an identity, c, such that f(x, c) = x. More...
 
static constexpr bool HasAbsorbingElement
 The functor has an absorbing element, c, such that f(c, x) = c. More...
 
static constexpr bool LeftDistributiveOver
 The functor is left-distributes under g. More...
 
static constexpr bool RightDistributiveOver
 The functor is right-distributes under g. More...
 
static constexpr bool Involutory
 f(f(x)) = x. More...
 
static constexpr bool Monoid
 Simultaneously total, associative, and with identity. More...
 
static constexpr bool Group
 An invertible monoid. More...
 
static constexpr bool AbelianMonoid
 A commutative monoid. More...
 
static constexpr bool AbelianGroup
 A commutative group. More...
 

Detailed Description

template<typename Functor>
struct sp::f::Traits< Functor >

Specifies the traits for a given functor.

This should be specialized for functors for which the defaults in TraitsBase are not appropriate. Specializations should inherit from TraitsBase and override its members.

See also
sp::f::TraitsBase.
Template Parameters
FunctorThe functor whose traits are being described.