The blo Library
Loading...
Searching...
No Matches
Namespaces | Functions
core.h File Reference

Threads and memory functions. More...

#include "defs.h"
#include <type_traits>
#include "core.inl"

Namespaces

namespace  blo
 The blo library.
 

Functions

BLO_API void blo::initialize ()
 Initializes the library.
 
BLO_API void blo::setMaxNumThreads (int numThreads)
 Sets the maximum number of threads.
 
BLO_API int blo::maxNumThreads ()
 Gets the maximum number of threads.
 
BLO_API size_t blo::calcStride (size_t sizeBytes)
 Calculates the stride for 64-byte aligned data.
 
BLO_API void * blo::allocate (size_t size)
 Allocates 64-byte aligned memory.
 
BLO_API void blo::deallocate (void *pData)
 Deallocates memory allocated by the allocate function.
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, T > * blo::allocateArray1D (int len)
 Allocates memory for 1D array.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, T > * blo::allocateArray1D (int len)
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, void > blo::deallocateArray1D (T *pData)
 Deallocates memory allocated by the allocateArray1D function.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, void > blo::deallocateArray1D (T *pData)
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, T > * blo::allocateArray2D (int rows, int columns, int &stride1)
 Allocates memory for 2D array.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, T > * blo::allocateArray2D (int rows, int columns, int &stride1)
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, void > blo::deallocateArray2D (T *pData)
 Deallocates memory allocated by the allocateArray2D function.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, void > blo::deallocateArray2D (T *pData)
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, T > * blo::allocateArray3D (int size1, int size2, int size3, int &stride1, int &stride2)
 Allocates memory for 3D array.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, T > * blo::allocateArray3D (int size1, int size2, int size3, int &stride1, int &stride2)
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, void > blo::deallocateArray3D (T *pData)
 Deallocates memory allocated by the allocateArray3D function.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, void > blo::deallocateArray3D (T *pData)
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, T > * blo::allocateArray2DColMaj (int rows, int columns, int &ld)
 Allocates memory for 2D column major array.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, T > * blo::allocateArray2DColMaj (int rows, int columns, int &ld)
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, void > blo::deallocateArray2DColMaj (T *pData)
 Deallocates memory allocated by the allocateArray2DColMaj function.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, void > blo::deallocateArray2DColMaj (T *pData)
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, T > * blo::allocateImage (int width, int height, int numChannels, int &stepBytes)
 Allocates memory for an image.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, T > * blo::allocateImage (int width, int height, int numChannels, int &stepBytes)
 
template<typename T >
std::enable_if_t<!std::is_polymorphic< T >::value, void > blo::deallocateImage (T *pData)
 Deallocates memory allocated by the allocateImage function.
 
template<typename T >
std::enable_if_t< std::is_polymorphic< T >::value, void > blo::deallocateImage (T *pData)
 
BLO_API const char * blo::getStatusString (Status status)
 Gets the string associated with a status.
 

Detailed Description

Threads and memory functions.