Blaze 3.9
InvCbrt.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_SHIMS_INVCBRT_H_
36#define _BLAZE_MATH_SHIMS_INVCBRT_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
45#include <blaze/util/Assert.h>
46#include <blaze/util/EnableIf.h>
48
49
50namespace blaze {
51
52//=================================================================================================
53//
54// INVCBRT SHIM
55//
56//=================================================================================================
57
58//*************************************************************************************************
68template< typename T, typename = EnableIf_t< IsBuiltin_v<T> > >
69inline auto invcbrt( T a ) noexcept -> decltype( inv( cbrt( a ) ) )
70{
71 BLAZE_USER_ASSERT( abs( a ) != T(0), "Invalid built-in value detected" );
72
73 return inv( cbrt( a ) );
74}
75//*************************************************************************************************
76
77} // namespace blaze
78
79#endif
Header file for run time assertion macros.
Header file for the EnableIf class template.
Header file for the invert shim.
Header file for the IsBuiltin type trait.
decltype(auto) cbrt(const DenseMatrix< MT, SO > &dm)
Computes the cubic root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1678
decltype(auto) abs(const DenseMatrix< MT, SO > &dm)
Applies the abs() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1296
decltype(auto) inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition: DMatInvExpr.h:405
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition: Assert.h:117
BLAZE_ALWAYS_INLINE const SIMDdouble invcbrt(const SIMDf64< T > &a) noexcept=delete
Computes the inverse cubic root for a vector of double precision floating point values.
Header file for the cbrt shim.