Blaze  3.6
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
blaze::Bind2nd< OP, A2 > Struct Template Reference

Generic wrapper for a binary operation with fixed 2nd argument. More...

#include <Bind2nd.h>

Public Member Functions

constexpr Bind2nd (const OP &op, const A2 &a2)
 Constructor of the Bind2nd functor. More...
 
template<typename T >
BLAZE_ALWAYS_INLINEdecltype(auto) constexpr operator() (const T &a) const
 Returns the result of the wrapped operation for the given object/value. More...
 
template<typename T >
decltype(auto) BLAZE_ALWAYS_INLINE load (const T &a) const
 Returns the result of the wrapped operation for the given SIMD vector. More...
 

Static Public Member Functions

template<typename T >
static constexpr bool simdEnabled ()
 Returns whether SIMD is enabled for the specified data type T. More...
 
static constexpr bool paddingEnabled ()
 Returns whether the operation supports padding, i.e. whether it can deal with zeros. More...
 

Private Attributes

OP op_
 The binary operation.
 
A2 a2_
 The 2nd argument.
 

Detailed Description

template<typename OP, typename A2>
struct blaze::Bind2nd< OP, A2 >

Generic wrapper for a binary operation with fixed 2nd argument.

Constructor & Destructor Documentation

◆ Bind2nd()

template<typename OP , typename A2 >
constexpr blaze::Bind2nd< OP, A2 >::Bind2nd ( const OP &  op,
const A2 &  a2 
)
inlineexplicit

Constructor of the Bind2nd functor.

Parameters
opThe binary operation.
a2The 2nd argument.

Member Function Documentation

◆ load()

template<typename OP , typename A2 >
template<typename T >
decltype(auto) BLAZE_ALWAYS_INLINE blaze::Bind2nd< OP, A2 >::load ( const T &  a) const
inline

Returns the result of the wrapped operation for the given SIMD vector.

Parameters
aThe given SIMD vector.
Returns
The result of the wrapped operation for the given SIMD vector.

◆ operator()()

template<typename OP , typename A2 >
template<typename T >
BLAZE_ALWAYS_INLINEdecltype(auto) constexpr blaze::Bind2nd< OP, A2 >::operator() ( const T &  a) const
inline

Returns the result of the wrapped operation for the given object/value.

Parameters
aThe given object/value.
Returns
The result of the wrapped operation for the given object/value.

◆ paddingEnabled()

template<typename OP , typename A2 >
static constexpr bool blaze::Bind2nd< OP, A2 >::paddingEnabled ( )
inlinestatic

Returns whether the operation supports padding, i.e. whether it can deal with zeros.

Returns
true in case padding is supported, false if not.

◆ simdEnabled()

template<typename OP , typename A2 >
template<typename T >
static constexpr bool blaze::Bind2nd< OP, A2 >::simdEnabled ( )
inlinestatic

Returns whether SIMD is enabled for the specified data type T.

Returns
true in case SIMD is enabled for the data type T, false if not.

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