|
template<bool Condition, typename T = void> |
using | blaze::EnableIf_t = typename EnableIf< Condition, T >::Type |
| Auxiliary type for the EnableIf class template. More...
|
|
template<bool Condition, typename T = void> |
using | blaze::DisableIf = EnableIf<!Condition, T > |
| Auxiliary type for the EnableIf class template. More...
|
|
template<bool Condition, typename T = void> |
using | blaze::DisableIf_t = typename EnableIf<!Condition, T >::Type |
| Auxiliary type for the EnableIf class template. More...
|
|
template<size_t Offset, size_t N> |
using | blaze::make_shifted_index_sequence = decltype(shift< Offset >(make_index_sequence< N >())) |
| Auxiliary alias declaration for the setup of shifted index sequences. More...
|
|
template<size_t Offset, size_t N, size_t ... Is> |
using | blaze::make_shifted_index_subsequence = decltype(subsequence< Is... >(shift< Offset >(make_index_sequence< N >()))) |
| Auxiliary alias declaration for the setup of shifted index subsequences. More...
|
|
template<bool B> |
using | blaze::BoolConstant = IntegralConstant< bool, B > |
| Generic wrapper for a compile time constant boolean value. More...
|
|
using | blaze::FalseType = BoolConstant< false > |
| Type/value traits base class. More...
|
|
using | blaze::TrueType = BoolConstant< true > |
| Type traits base class. More...
|
|
template<bool B> |
using | blaze::Bool_t = IntegralConstant< bool, B > |
| Compile time integral constant wrapper for bool. More...
|
|
template<char N> |
using | blaze::Char_t = IntegralConstant< char, N > |
| Compile time integral constant wrapper for char. More...
|
|
template<int N> |
using | blaze::Int_t = IntegralConstant< int, N > |
| Compile time integral constant wrapper for int. More...
|
|
template<long N> |
using | blaze::Long_t = IntegralConstant< long, N > |
| Compile time integral constant wrapper for long. More...
|
|
template<ptrdiff_t N> |
using | blaze::Ptrdiff_t = IntegralConstant< ptrdiff_t, N > |
| Compile time integral constant wrapper for ptrdiff_t. More...
|
|
template<size_t N> |
using | blaze::Size_t = IntegralConstant< size_t, N > |
| Compile time integral constant wrapper for size_t. More...
|
|
template<bool Condition, typename T1 , typename T2 > |
using | blaze::If_t = typename If< Condition >::template Type< T1, T2 > |
| Auxiliary alias template for the If class template. More...
|
|
using | blaze::byte_t = unsigned char |
| Byte data type of the Blaze library. More...
|
|
using | blaze::large_t = int64_t |
| The largest available signed integer data type.
|
|
using | blaze::ularge_t = uint64_t |
| The largest available unsigned integer data type.
|
|
using | blaze::id_t = ularge_t |
| Unsigned integer data type for integral IDs.
|
|
using | blaze::fortran_charlen_t = size_t |
| Type of the hidden arguments of character type within a Fortran forward declaration.
|
|
|
template<typename T > |
BLAZE_ALWAYS_INLINE bool | blaze::checkAlignment (const T *address) |
| Checks the alignment of the given address. More...
|
|
template<typename T > |
constexpr AddConst_t< T > & | blaze::as_const (T &v) noexcept |
| Adding 'const' to the given lvalue. More...
|
|
template<typename T > |
void | blaze::as_const (const T &&)=delete |
| Overload of the as_const() function for rvalues. More...
|
|
template<typename T , size_t N> |
constexpr size_t | blaze::dimensionof (T(&a)[N]) |
| Static evaluation of array dimensions. More...
|
|
template<size_t... I1s, size_t... I2s> |
constexpr bool | blaze::operator== (index_sequence< I1s... > lhs, index_sequence< I2s... > rhs) noexcept |
| Equality operator for the comparison of two index sequences. More...
|
|
template<size_t... I1s, size_t... I2s> |
constexpr bool | blaze::operator!= (index_sequence< I1s... > lhs, index_sequence< I2s... > rhs) noexcept |
| Inequality operator for the comparison of two index sequences. More...
|
|
template<bool B> |
constexpr BoolConstant<!B > | blaze::operator! (BoolConstant< B >) noexcept |
| Logical NOT of a boolean constant. More...
|
|
template<bool B1, bool B2> |
constexpr BoolConstant< B1 &&B2 > | blaze::operator&& (BoolConstant< B1 >, BoolConstant< B2 >) noexcept |
| Logical AND of two boolean constants. More...
|
|
template<bool B1, bool B2> |
constexpr BoolConstant< B1||B2 > | blaze::operator|| (BoolConstant< B1 >, BoolConstant< B2 >) noexcept |
| Logical OR of two boolean constants. More...
|
|
template<typename... Args> |
constexpr void | blaze::MAYBE_UNUSED (const Args &...) |
| Suppression of unused parameter warnings. More...
|
|
byte_t * | blaze::alignedAllocate (size_t size, size_t alignment) |
| Aligned array allocation. More...
|
|
void | blaze::alignedDeallocate (const void *address) noexcept |
| Deallocation of aligned memory. More...
|
|
template<typename T , EnableIf_t< IsBuiltin_v< T > > * = nullptr> |
T * | blaze::allocate (size_t size) |
| Aligned array allocation for built-in data types. More...
|
|
template<typename T , EnableIf_t< IsBuiltin_v< T > > * = nullptr> |
void | blaze::deallocate (T *address) noexcept |
| Deallocation of memory for built-in data types. More...
|
|
template<typename T > |
BLAZE_ALWAYS_INLINE size_t | blaze::misalignment (const T *address) |
| Computes the misalignment of the given address. More...
|
|
|
template<typename T1 , size_t N1, typename A1 , typename T2 , size_t N2, typename A2 > |
bool | blaze::operator== (const SmallArray< T1, N1, A1 > &lhs, const SmallArray< T2, N2, A2 > &rhs) |
| Equality operator for the comparison of two dense arrays. More...
|
|
template<typename T1 , size_t N1, typename A1 , typename T2 , size_t N2, typename A2 > |
bool | blaze::operator!= (const SmallArray< T1, N1, A1 > &lhs, const SmallArray< T2, N2, A2 > &rhs) |
| Inequality operator for the comparison of two dense arrays. More...
|
|
template<typename T , size_t N, typename A > |
SmallArray< T, N, A >::Iterator | blaze::begin (SmallArray< T, N, A > &sa) |
| Returns an iterator to the first element of the given small array. More...
|
|
template<typename T , size_t N, typename A > |
SmallArray< T, N, A >::ConstIterator | blaze::begin (const SmallArray< T, N, A > &sa) |
| Returns an iterator to the first element of the given small array. More...
|
|
template<typename T , size_t N, typename A > |
SmallArray< T, N, A >::ConstIterator | blaze::cbegin (const SmallArray< T, N, A > &sa) |
| Returns an iterator to the first element of the given small array. More...
|
|
template<typename T , size_t N, typename A > |
SmallArray< T, N, A >::Iterator | blaze::end (SmallArray< T, N, A > &sa) |
| Returns an iterator just past the last element of the given small array. More...
|
|
template<typename T , size_t N, typename A > |
SmallArray< T, N, A >::ConstIterator | blaze::end (const SmallArray< T, N, A > &sa) |
| Returns an iterator just past the last element of the given small array. More...
|
|
template<typename T , size_t N, typename A > |
SmallArray< T, N, A >::ConstIterator | blaze::cend (const SmallArray< T, N, A > &sa) |
| Returns an iterator just past the last element of the given small array. More...
|
|
template<typename T , size_t N, typename A > |
void | blaze::clear (SmallArray< T, N, A > &sa) |
| Clearing the given small array. More...
|
|
template<typename T , size_t N, typename A > |
void | blaze::swap (SmallArray< T, N, A > &a, SmallArray< T, N, A > &b) noexcept(IsNothrowMoveConstructible_v< T >) |
| Swapping the contents of two small arrays. More...
|
|
#define BLAZE_FUNCTION_TRACE |
Function trace macro.
This macro can be used to reliably trace function calls. In case function tracing is activated, function traces are written to the console via std::cerr
. The following short example demonstrates how the function trace macro is used:
int main( int argc, char** argv )
{
}
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94
The macro should be used as the very first statement inside the function in order to guarantee that writing the function trace is the very first and last action of the function call.
Function tracing can be enabled or disabled via the BLAZE_USE_FUNCTION_TRACES macro. If function tracing is activated, trace information of the following form will be written to std::cerr:
+ [Thread 0] Entering function 'int main()' in file 'TraceDemo.cpp'
- [Thread 0] Leaving function 'int main()' in file 'TraceDemo.cpp'
In case function tracing is deactivated, all function trace functionality is completely removed from the code, i.e. no function traces are logged and no overhead results from the BLAZE_FUNCTION_TRACE macro.
#define BLAZE_THROW |
( |
|
EXCEPTION | ) |
throw EXCEPTION |
Macro for the error reporting mechanism of the Blaze library.
This macro encapsulates the default, general way of the Blaze library to report errors of any kind by throwing an exception. Also, since under certain conditions and environments it may be desirable to replace exceptions by a different error reporting mechanism this macro provides an opportunity to customize the error reporting approach.
The macro excepts a single argument, which specifies the exception to be thrown:
#define BLAZE_THROW( EXCEPTION ) \
throw EXCEPTION
In order to customize the error reporing mechanism all that needs to be done is to define the macro prior to including any Blaze header file. This will cause the Blaze specific mechanism to be overridden. The following example demonstrates this by replacing exceptions by a call to a log() function and a direct call to abort:
#define BLAZE_THROW( EXCEPTION ) \
log( "..." ); \
abort()
Primary include file of the Blaze library.
- Note
- It is possible to execute several statements instead of executing a single statement to throw an exception. Also note that it is recommended to define the macro such that a subsequent semicolon is required!
- Warning
- This macro is provided with the intention to assist in adapting Blaze to special conditions and environments. However, the customization of the error reporting mechanism via this macro can have a significant effect on the library. Thus be advised to use the macro with due care!
#define BLAZE_THROW_INVALID_ARGUMENT |
( |
|
MESSAGE | ) |
BLAZE_THROW( std::invalid_argument( MESSAGE ) ) |
Macro for the emission of a std::invalid_argument exception.
This macro encapsulates the default way of Blaze to throw a std::invalid_argument exception. Also, since it may be desirable to replace the type of exception by a custom exception type this macro provides an opportunity to customize the behavior.
The macro excepts a single argument, which specifies the message of the exception:
#define BLAZE_THROW_INVALID_ARGUMENT( MESSAGE ) \
BLAZE_THROW( std::invalid_argument( MESSAGE ) )
In order to customize the type of exception all that needs to be done is to define the macro prior to including any Blaze header file. This will override the Blaze default behavior. The following example demonstrates this by replacing std::invalid_argument by a custom exception type:
class InvalidArgument
{
public:
InvalidArgument();
explicit InvalidArgument( const std::string& message );
};
#define BLAZE_THROW_INVALID_ARGUMENT( MESSAGE ) \
throw InvalidArgument( MESSAGE )
- Note
- It is recommended to define the macro such that a subsequent semicolon is required!
- Warning
- This macro is provided with the intention to assist in adapting Blaze to special conditions and environments. However, the customization of the type of exception via this macro may have an effect on the library. Thus be advised to use the macro with due care!
#define BLAZE_THROW_LENGTH_ERROR |
( |
|
MESSAGE | ) |
BLAZE_THROW( std::length_error( MESSAGE ) ) |
Macro for the emission of a std::length_error exception.
This macro encapsulates the default way of Blaze to throw a std::length_error exception. Also, since it may be desirable to replace the type of exception by a custom exception type this macro provides an opportunity to customize the behavior.
The macro excepts a single argument, which specifies the message of the exception:
#define BLAZE_THROW_LENGTH_ERROR( MESSAGE ) \
BLAZE_THROW( std::length_error( MESSAGE ) )
In order to customize the type of exception all that needs to be done is to define the macro prior to including any Blaze header file. This will override the Blaze default behavior. The following example demonstrates this by replacing std::length_error by a custom exception type:
class LengthError
{
public:
LengthError();
explicit LengthError( const std::string& message );
};
#define BLAZE_THROW_LENGTH_ERROR( MESSAGE ) \
throw LengthError( MESSAGE )
- Note
- It is recommended to define the macro such that a subsequent semicolon is required!
- Warning
- This macro is provided with the intention to assist in adapting Blaze to special conditions and environments. However, the customization of the type of exception via this macro may have an effect on the library. Thus be advised to use the macro with due care!
#define BLAZE_THROW_LOGIC_ERROR |
( |
|
MESSAGE | ) |
BLAZE_THROW( std::logic_error( MESSAGE ) ) |
Macro for the emission of a std::logic_error exception.
This macro encapsulates the default way of Blaze to throw a std::logic_error exception. Also, since it may be desirable to replace the type of exception by a custom exception type this macro provides an opportunity to customize the behavior.
The macro excepts a single argument, which specifies the message of the exception:
#define BLAZE_THROW_LOGIC_ERROR( MESSAGE ) \
BLAZE_THROW( std::logic_error( MESSAGE ) )
In order to customize the type of exception all that needs to be done is to define the macro prior to including any Blaze header file. This will override the Blaze default behavior. The following example demonstrates this by replacing std::logic_error by a custom exception type:
class LogicError
{
public:
LogicError();
explicit LogicError( const std::string& message );
};
#define BLAZE_THROW_LOGIC_ERROR( MESSAGE ) \
throw LogicError( MESSAGE )
- Note
- It is recommended to define the macro such that a subsequent semicolon is required!
- Warning
- This macro is provided with the intention to assist in adapting Blaze to special conditions and environments. However, the customization of the type of exception via this macro may have an effect on the library. Thus be advised to use the macro with due care!
#define BLAZE_THROW_OUT_OF_RANGE |
( |
|
MESSAGE | ) |
BLAZE_THROW( std::out_of_range( MESSAGE ) ) |
Macro for the emission of a std::out_of_range exception.
This macro encapsulates the default way of Blaze to throw a std::out_of_range exception. Also, since it may be desirable to replace the type of exception by a custom exception type this macro provides an opportunity to customize the behavior.
The macro excepts a single argument, which specifies the message of the exception:
#define BLAZE_THROW_OUT_OF_RANGE( MESSAGE ) \
BLAZE_THROW( std::out_of_range( MESSAGE ) )
In order to customize the type of exception all that needs to be done is to define the macro prior to including any Blaze header file. This will override the Blaze default behavior. The following example demonstrates this by replacing std::out_of_range by a custom exception type:
class OutOfRange
{
public:
OutOfRange();
explicit OutOfRange( const std::string& message );
};
#define BLAZE_THROW_OUT_OF_RANGE( MESSAGE ) \
throw OutOfRange( MESSAGE )
- Note
- It is recommended to define the macro such that a subsequent semicolon is required!
- Warning
- This macro is provided with the intention to assist in adapting Blaze to special conditions and environments. However, the customization of the type of exception via this macro may have an effect on the library. Thus be advised to use the macro with due care!
#define BLAZE_THROW_OVERFLOW_ERROR |
( |
|
MESSAGE | ) |
BLAZE_THROW( std::overflow_error( MESSAGE ) ) |
Macro for the emission of a std::overflow_error exception.
This macro encapsulates the default way of Blaze to throw a std::overflow_error exception. Also, since it may be desirable to replace the type of exception by a custom exception type this macro provides an opportunity to customize the behavior.
The macro excepts a single argument, which specifies the message of the exception:
#define BLAZE_THROW_OVERFLOW_ERROR( MESSAGE ) \
BLAZE_THROW( std::overflow_error( MESSAGE ) )
In order to customize the type of exception all that needs to be done is to define the macro prior to including any Blaze header file. This will override the Blaze default behavior. The following example demonstrates this by replacing std::overflow_error by a custom exception type:
class OverflowError
{
public:
OverflowError();
explicit OverflowError( const std::string& message );
};
#define BLAZE_THROW_OVERFLOW_ERROR( MESSAGE ) \
throw OverflowError( MESSAGE )
- Note
- It is recommended to define the macro such that a subsequent semicolon is required!
- Warning
- This macro is provided with the intention to assist in adapting Blaze to special conditions and environments. However, the customization of the type of exception via this macro may have an effect on the library. Thus be advised to use the macro with due care!
#define BLAZE_THROW_RUNTIME_ERROR |
( |
|
MESSAGE | ) |
BLAZE_THROW( std::runtime_error( MESSAGE ) ) |
Macro for the emission of a std::runtime_error exception.
This macro encapsulates the default way of Blaze to throw a std::runtime_error exception. Also, since it may be desirable to replace the type of exception by a custom exception type this macro provides an opportunity to customize the behavior.
The macro excepts a single argument, which specifies the message of the exception:
#define BLAZE_THROW_RUNTIME_ERROR( MESSAGE ) \
BLAZE_THROW( std::runtime_error( MESSAGE ) )
In order to customize the type of exception all that needs to be done is to define the macro prior to including any Blaze header file. This will override the Blaze default behavior. The following example demonstrates this by replacing std::runtime_error by a custom exception type:
class RuntimeError
{
public:
RuntimeError();
explicit RuntimeError( const std::string& message );
};
#define BLAZE_THROW_RUNTIME_ERROR( MESSAGE ) \
throw RuntimeError( MESSAGE )
- Note
- It is recommended to define the macro such that a subsequent semicolon is required!
- Warning
- This macro is provided with the intention to assist in adapting Blaze to special conditions and environments. However, the customization of the type of exception via this macro may have an effect on the library. Thus be advised to use the macro with due care!
#define BLAZE_THROW_UNDERFLOW_ERROR |
( |
|
MESSAGE | ) |
BLAZE_THROW( std::underflow_error( MESSAGE ) ) |
Macro for the emission of a std::underflow_error exception.
This macro encapsulates the default way of Blaze to throw a std::underflow_error exception. Also, since it may be desirable to replace the type of exception by a custom exception type this macro provides an opportunity to customize the behavior.
The macro excepts a single argument, which specifies the message of the exception:
#define BLAZE_THROW_UNDERFLOW_ERROR( MESSAGE ) \
BLAZE_THROW( std::underflow_error( MESSAGE ) )
In order to customize the type of exception all that needs to be done is to define the macro prior to including any Blaze header file. This will override the Blaze default behavior. The following example demonstrates this by replacing std::underflow_error by a custom exception type:
class UnderflowError
{
public:
UnderflowError();
explicit UnderflowError( const std::string& message );
};
#define BLAZE_THROW_UNDERFLOW_ERROR( MESSAGE ) \
throw UnderflowError( MESSAGE )
- Note
- It is recommended to define the macro such that a subsequent semicolon is required!
- Warning
- This macro is provided with the intention to assist in adapting Blaze to special conditions and environments. However, the customization of the type of exception via this macro may have an effect on the library. Thus be advised to use the macro with due care!
template<typename T ,
EnableIf_t< IsBuiltin_v< T > > * = nullptr>
T * blaze::allocate |
( |
size_t |
size | ) |
|
Aligned array allocation for built-in data types.
Aligned array allocation for user-specific class types.
- Parameters
-
size | The number of elements of the given type to allocate. |
- Returns
- Pointer to the first element of the aligned array.
- Exceptions
-
std::bad_alloc | Allocation failed. |
The allocate() function provides the functionality to allocate memory based on the alignment restrictions of the given built-in data type. For instance, in case SSE vectorization is possible, the returned memory is guaranteed to be at least 16-byte aligned. In case AVX is active, the memory is even guaranteed to be at least 32-byte aligned.
Examples:
double* dp = allocate<double>( 10UL );
- Parameters
-
size | The number of elements of the given type to allocate. |
- Returns
- Pointer to the first element of the aligned array.
- Exceptions
-
std::bad_alloc | Allocation failed. |
The allocate() function provides the functionality to allocate memory based on the alignment restrictions of the given user-specific class type. For instance, in case the given type has the requirement to be 32-byte aligned, the returned pointer is guaranteed to be 32-byte aligned. Additionally, all elements of the array are guaranteed to be default constructed. Note that the allocate() function provides exception safety similar to the new operator: In case any element throws an exception during construction, all elements that have already been constructed are destroyed in reverse order and the allocated memory is deallocated again.
template<typename... Args>
constexpr void blaze::MAYBE_UNUSED |
( |
const Args & |
... | ) |
|
|
constexpr |
Suppression of unused parameter warnings.
- Returns
- void
The MAYBE_UNUSED function provides the functionality to suppress warnings about any number of unused parameters. Usually this problem occurs in case a parameter is given a name but is not used within the function:
A possible solution is to keep the parameter unnamed:
However, there are situations where is approach is not possible, as for instance in case the variable must be documented via Doxygen. For these cases, the MAYBE_UNUSED class can be used to suppress the warnings:
void f( int x )
{
}
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81