Adjusted Math.h.in for const vtkm::Float32 function inputs
This commit is contained in:
parent
7d6601d794
commit
71b2348dd9
19
vtkm/Math.h
19
vtkm/Math.h
@ -99,21 +99,22 @@ vtkm::Float64 Pi_4()
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct FloatingPointReturnCondition :
|
||||
std::enable_if<std::is_same<typename vtkm::VecTraits<T>::ComponentType, vtkm::Float32>::value ||
|
||||
std::is_same<typename vtkm::VecTraits<T>::ComponentType, const vtkm::Float32>::value>
|
||||
{
|
||||
};
|
||||
|
||||
template<typename T, typename = void>
|
||||
struct FloatingPointReturnType
|
||||
{
|
||||
typedef vtkm::Float64 Type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct FloatingPointReturnType<vtkm::Float32>
|
||||
{
|
||||
typedef vtkm::Float32 Type;
|
||||
};
|
||||
|
||||
template<vtkm::IdComponent N>
|
||||
struct FloatingPointReturnType<Vec<vtkm::Float32,N> >
|
||||
template<typename T>
|
||||
struct FloatingPointReturnType<T, typename FloatingPointReturnCondition<T>::type>
|
||||
{
|
||||
typedef vtkm::Float32 Type;
|
||||
};
|
||||
|
@ -242,21 +242,22 @@ vtkm::Float64 Pi_4()
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct FloatingPointReturnCondition :
|
||||
std::enable_if<std::is_same<typename vtkm::VecTraits<T>::ComponentType, vtkm::Float32>::value ||
|
||||
std::is_same<typename vtkm::VecTraits<T>::ComponentType, const vtkm::Float32>::value>
|
||||
{
|
||||
};
|
||||
|
||||
template<typename T, typename = void>
|
||||
struct FloatingPointReturnType
|
||||
{
|
||||
typedef vtkm::Float64 Type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct FloatingPointReturnType<vtkm::Float32>
|
||||
{
|
||||
typedef vtkm::Float32 Type;
|
||||
};
|
||||
|
||||
template<vtkm::IdComponent N>
|
||||
struct FloatingPointReturnType<Vec<vtkm::Float32,N> >
|
||||
template<typename T>
|
||||
struct FloatingPointReturnType<T, typename FloatingPointReturnCondition<T>::type>
|
||||
{
|
||||
typedef vtkm::Float32 Type;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user