Optimized Belief Propagation (CPU and GPU)
simd_processing Namespace Reference

General functions for processing using SIMD vector data types on CPU.
Template specializations must be defined to support specific SIMD vector data types. More...

Functions

template<RunData_t T, RunDataVect_t U>
LoadPackedDataAligned (unsigned int x, unsigned int y, unsigned int current_disparity, const beliefprop::BpLevelProperties &current_bp_level, unsigned int numDispVals, const T *inData)
 Load multiple values of primitive type data from inData array to SIMD vector data type
inData array must be aligned according to the rules of the specified SIMD type to use this operation. More...
 
template<RunData_t T, RunDataVect_t U>
LoadPackedDataUnaligned (unsigned int x, unsigned int y, unsigned int current_disparity, const beliefprop::BpLevelProperties &current_bp_level, unsigned int numDispVals, const T *inData)
 Load multiple values of primitive type data from inData array to SIMD vector data type
inData array does not need to be aligned to use this operation. More...
 
template<RunDataVect_t T>
createSIMDVectorSameData (float data)
 Create a SIMD vector of the specified type with all elements containing the same data. More...
 
template<RunDataSingOrVect_t T, RunDataSingOrVect_t U, RunDataSingOrVect_t V>
AddVals (const T &val1, const U &val2)
 Add values of specified types and return sum as specified type
Define template specialization to support addition of specific SIMD vector types. More...
 
template<RunDataSingOrVect_t T, RunDataSingOrVect_t U, RunDataSingOrVect_t V>
SubtractVals (const T &val1, const U &val2)
 Subtract values of specified types and return difference as specified type Define template specialization to support subtraction of specific SIMD vector types. More...
 
template<RunDataSingOrVect_t T, RunDataSingOrVect_t U, RunDataSingOrVect_t V>
divideVals (const T &val1, const U &val2)
 Divide values of specified types and return quotient as specified type
Define template specialization to support division of specific SIMD vector types. More...
 
template<RunDataSingOrVect_t T, RunDataSingOrVect_t V>
ConvertValToDatatype (V val)
 Convert value of specified type to value of another specified type
Define template specialization to support conversion between specific types for SIMD vector processing. More...
 
template<RunDataSingOrVect_t T>
GetMinByElement (const T &val1, const T &val2)
 Get element-wise minimum of two inputs which may be of a SIMD vector type where corresponding values within the SIMD vector are compared
Define template specialization to support function for specific vector type. More...
 
template<RunData_t T, RunDataVectProcess_t U>
void StorePackedDataAligned (unsigned int indexDataStore, T *locationDataStore, const U &dataToStore)
 Write data in SIMD vector (or single element) to specified location in array
Array that data is written to must be aligned according to the rules of the specified SIMD type to use this operation. More...
 
template<RunData_t T, RunDataVectProcess_t U>
void StorePackedDataUnaligned (unsigned int indexDataStore, T *locationDataStore, const U &dataToStore)
 Write data in SIMD vector (or single element) to specified location in array
Array that data is written does not need to be aligned to use this operation. More...
 

Detailed Description

General functions for processing using SIMD vector data types on CPU.
Template specializations must be defined to support specific SIMD vector data types.

Function Documentation

◆ AddVals()

template<RunDataSingOrVect_t T, RunDataSingOrVect_t U, RunDataSingOrVect_t V>
V simd_processing::AddVals ( const T &  val1,
const U &  val2 
)

Add values of specified types and return sum as specified type
Define template specialization to support addition of specific SIMD vector types.

Template Parameters
T
U
V
Parameters
val1
val2
Returns
SIMD structure with sum of values

Definition at line 117 of file SIMDProcessing.h.

◆ ConvertValToDatatype()

template<RunDataSingOrVect_t T, RunDataSingOrVect_t V>
T simd_processing::ConvertValToDatatype ( val)

Convert value of specified type to value of another specified type
Define template specialization to support conversion between specific types for SIMD vector processing.

Template Parameters
T
V
Parameters
val
Returns
Value converted to specified type

Definition at line 158 of file SIMDProcessing.h.

◆ createSIMDVectorSameData()

template<RunDataVect_t T>
T simd_processing::createSIMDVectorSameData ( float  data)

Create a SIMD vector of the specified type with all elements containing the same data.

Template Parameters
T
Parameters
data
Returns
SIMD structure with all elements containing the same data

Definition at line 100 of file SIMDProcessing.h.

◆ divideVals()

template<RunDataSingOrVect_t T, RunDataSingOrVect_t U, RunDataSingOrVect_t V>
V simd_processing::divideVals ( const T &  val1,
const U &  val2 
)

Divide values of specified types and return quotient as specified type
Define template specialization to support division of specific SIMD vector types.

Template Parameters
T
U
V
Parameters
val1
val2
Returns
SIMD structure with quotient of values

Definition at line 145 of file SIMDProcessing.h.

◆ GetMinByElement()

template<RunDataSingOrVect_t T>
T simd_processing::GetMinByElement ( const T &  val1,
const T &  val2 
)

Get element-wise minimum of two inputs which may be of a SIMD vector type where corresponding values within the SIMD vector are compared
Define template specialization to support function for specific vector type.

Template Parameters
T
Parameters
val1
val2
Returns
Element-wise minimum of two inputs (may be SIMD structures)

Definition at line 171 of file SIMDProcessing.h.

◆ LoadPackedDataAligned()

template<RunData_t T, RunDataVect_t U>
U simd_processing::LoadPackedDataAligned ( unsigned int  x,
unsigned int  y,
unsigned int  current_disparity,
const beliefprop::BpLevelProperties current_bp_level,
unsigned int  numDispVals,
const T *  inData 
)

Load multiple values of primitive type data from inData array to SIMD vector data type
inData array must be aligned according to the rules of the specified SIMD type to use this operation.

Template Parameters
T
U
Parameters
x
y
current_disparity
current_bp_level
numDispVals
inData
Returns
SIMD structure with data loaded

Definition at line 61 of file SIMDProcessing.h.

◆ LoadPackedDataUnaligned()

template<RunData_t T, RunDataVect_t U>
U simd_processing::LoadPackedDataUnaligned ( unsigned int  x,
unsigned int  y,
unsigned int  current_disparity,
const beliefprop::BpLevelProperties current_bp_level,
unsigned int  numDispVals,
const T *  inData 
)

Load multiple values of primitive type data from inData array to SIMD vector data type
inData array does not need to be aligned to use this operation.

Template Parameters
T
U
Parameters
x
y
current_disparity
current_bp_level
numDispVals
inData
Returns
SIMD structure with data loaded

Definition at line 84 of file SIMDProcessing.h.

◆ StorePackedDataAligned()

template<RunData_t T, RunDataVectProcess_t U>
void simd_processing::StorePackedDataAligned ( unsigned int  indexDataStore,
T *  locationDataStore,
const U &  dataToStore 
)

Write data in SIMD vector (or single element) to specified location in array
Array that data is written to must be aligned according to the rules of the specified SIMD type to use this operation.

Template Parameters
T
U
Parameters
indexDataStore
locationDataStore
dataToStore

Definition at line 186 of file SIMDProcessing.h.

◆ StorePackedDataUnaligned()

template<RunData_t T, RunDataVectProcess_t U>
void simd_processing::StorePackedDataUnaligned ( unsigned int  indexDataStore,
T *  locationDataStore,
const U &  dataToStore 
)

Write data in SIMD vector (or single element) to specified location in array
Array that data is written does not need to be aligned to use this operation.

Template Parameters
T
U
Parameters
indexDataStore
locationDataStore
dataToStore

Definition at line 203 of file SIMDProcessing.h.

◆ SubtractVals()

template<RunDataSingOrVect_t T, RunDataSingOrVect_t U, RunDataSingOrVect_t V>
V simd_processing::SubtractVals ( const T &  val1,
const U &  val2 
)

Subtract values of specified types and return difference as specified type Define template specialization to support subtraction of specific SIMD vector types.

Template Parameters
T
U
V
Parameters
val1
val2
Returns
SIMD structure with difference of values

Definition at line 131 of file SIMDProcessing.h.