AVIR
High-quality pro image resizing library
 All Classes Files Functions Variables Typedefs Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
avir::float8 Class Reference

#include <avir_float8_avx.h>

Public Member Functions

 float8 (const float8 &s)
 
 float8 (const __m256 s)
 
 float8 (const float s)
 
float hadd () const
 
 operator float () const
 
float8 operator* (const float8 &s) const
 
float8operator*= (const float8 &s)
 
float8 operator+ (const float8 &s) const
 
float8operator+= (const float8 &s)
 
float8 operator- (const float8 &s) const
 
float8operator-= (const float8 &s)
 
float8 operator/ (const float8 &s) const
 
float8operator/= (const float8 &s)
 
float8operator= (const float8 &s)
 
float8operator= (const __m256 s)
 
float8operator= (const float s)
 
void store (float *const p) const
 
void storeu (float *const p) const
 
void storeu (float *p, int lim) const
 

Static Public Member Functions

static void addu (float *const p, const float8 &v)
 
static void addu (float *const p, const float8 &v, const int lim)
 
static float8 load (const float *const p)
 
static float8 loadu (const float *const p)
 
static float8 loadu (const float *const p, const int lim)
 

Public Attributes

__m256 value
 

Detailed Description

SIMD packed 8-float type.

This class implements a packed 8-float type that can be used to perform parallel computation using SIMD instructions on AVX-enabled processors. This class can be used as the "fptype" argument of the avir::fpclass_def or avir::fpclass_def_dil class.

Member Function Documentation

static void avir::float8::addu ( float *const  p,
const float8 v 
)
static

Function performs in-place addition of a value located in memory and the specified value.

Parameters
pPointer to value where addition happens. May be unaligned.
vValue to add.
static void avir::float8::addu ( float *const  p,
const float8 v,
const int  lim 
)
static

Function performs in-place addition of a value located in memory and the specified value. Limited to the specfied number of elements.

Parameters
pPointer to value where addition happens. May be unaligned.
vValue to add.
limThe element number limit, >0.
float avir::float8::hadd ( ) const
Returns
Horizontal sum of elements.
static float8 avir::float8::load ( const float *const  p)
static
Parameters
pPointer to memory from where the value should be loaded, should be 32-byte aligned.
Returns
float8 value loaded from the specified memory location.
static float8 avir::float8::loadu ( const float *const  p)
static
Parameters
pPointer to memory from where the value should be loaded, may have any alignment.
Returns
float8 value loaded from the specified memory location.
static float8 avir::float8::loadu ( const float *const  p,
const int  lim 
)
static
Parameters
pPointer to memory from where the value should be loaded, may have any alignment.
limThe maximum number of elements to load, >0.
Returns
float8 value loaded from the specified memory location, with elements beyond "lim" set to 0.
void avir::float8::store ( float *const  p) const

Function stores *this value to the specified memory location.

Parameters
[out]pOutput memory location, should be 32-byte aligned.
void avir::float8::storeu ( float *const  p) const

Function stores *this value to the specified memory location.

Parameters
[out]pOutput memory location, may have any alignment.
void avir::float8::storeu ( float *  p,
int  lim 
) const

Function stores "lim" lower elements of *this value to the specified memory location.

Parameters
[out]pOutput memory location, may have any alignment.
limThe number of lower elements to store, >0.

Member Data Documentation

__m256 avir::float8::value

Packed value of 8 floats.