MUDA
Loading...
Searching...
No Matches
utility.h
1#pragma once
2#include <muda/muda_def.h>
3#include <vector_types.h>
4#include <math_constants.h>
5
6namespace muda::lbvh
7{
8template <typename T>
9struct vector_of;
10template <>
11struct vector_of<float>
12{
13 using type = float4;
14};
15template <>
16struct vector_of<double>
17{
18 using type = double4;
19};
20
21template <typename T>
22using vector_of_t = typename vector_of<T>::type;
23
24template <typename T>
25__device__ inline T infinity() noexcept;
26
27template <>
28__device__ inline float infinity<float>() noexcept
29{
30 return CUDART_INF_F;
31}
32template <>
33__device__ inline double infinity<double>() noexcept
34{
35 return CUDART_INF;
36}
37
38} // namespace muda::lbvh
Definition utility.h:9