VCTR
Loading...
Searching...
No Matches
vctr::expressions::FastExp2< extent, SrcType > Class Template Reference

Calculates a fast approximation for the exp2 function. More...

Inheritance diagram for vctr::expressions::FastExp2< extent, SrcType >:
vctr::ExpressionTemplateBase

Public Types

using value_type = ValueType< SrcType >
 
using Constants = detail::FastExp2Constants< value_type >
 

Public Member Functions

VCTR_FORCEDINLINE value_type operator[] (size_t i) const
 
VCTR_FORCEDINLINE VCTR_TARGET ("avx") void prepareAVXEvaluation() const
 
VCTR_FORCEDINLINE VCTR_TARGET ("fma") AVXRegister< value_type > getAVX(size_t i) const
 
VCTR_FORCEDINLINE VCTR_TARGET ("sse4.1") void prepareSSEEvaluation() const
 
VCTR_FORCEDINLINE VCTR_TARGET ("sse4.1") SSERegister< value_type > getSSE(size_t i) const
 
void prepareNeonEvaluation () const
 
NeonRegister< value_type > getNeon (size_t i) const
 

Detailed Description

template<size_t extent, class SrcType>
requires is::realFloatNumber<ValueType<SrcType>>
class vctr::expressions::FastExp2< extent, SrcType >

Calculates a fast approximation for the exp2 function.

This implementation is inspired by https://stackoverflow.com/a/65562273. It relies on reinterpreting the bytes of a float as integer and manipulating the exponent and mantissa part.


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