Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
shims
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
43
#include <
blaze/math/shims/Invert.h
>
44
#include <
blaze/math/shims/Cbrt.h
>
45
#include <
blaze/util/Assert.h
>
46
#include <
blaze/util/EnableIf.h
>
47
#include <
blaze/util/typetraits/IsBuiltin.h
>
48
49
50
namespace
blaze {
51
52
//=================================================================================================
53
//
54
// INVCBRT SHIM
55
//
56
//=================================================================================================
57
58
//*************************************************************************************************
68
template
<
typename
T,
typename
= EnableIf_t< IsBuiltin_v<T> > >
69
inline
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
Assert.h
Header file for run time assertion macros.
EnableIf.h
Header file for the EnableIf class template.
Invert.h
Header file for the invert shim.
IsBuiltin.h
Header file for the IsBuiltin type trait.
blaze::cbrt
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
blaze::invcbrt
decltype(auto) invcbrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse cubic root of each single element of the dense matrix dm.
Definition
DMatMapExpr.h:1709
blaze::abs
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
blaze::inv
decltype(auto) inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition
DMatInvExpr.h:405
BLAZE_USER_ASSERT
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition
Assert.h:117
Cbrt.h
Header file for the cbrt shim.
Generated by
1.18.0