Fermat
Public Types | Public Methods | Public Members | Static Public Members | List of all members
cugar::leading_bits< word_type > Struct Template Reference

Detailed description

template<typename word_type>
struct cugar::leading_bits< word_type >

A functor to take the n leading bits of a word

#include <functors.h>

Public Types

typedef word_type argument_type
 
typedef word_type result_type
 

Public Methods

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE leading_bits (const uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE result_type operator() (const argument_type op) const
 

Public Members

const uint32 n_bits
 

Static Public Members

static const uint32 BITS = 8u * sizeof(word_type)
 

Constructor & Destructor Documentation

◆ leading_bits()

template<typename word_type >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE cugar::leading_bits< word_type >::leading_bits ( const uint32  n)
inline

constructor

Member Function Documentation

◆ operator()()

template<typename word_type >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE result_type cugar::leading_bits< word_type >::operator() ( const argument_type  op) const
inline

functor implementation


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