Alsvinn  0.5.3
The fast FVM simulator with UQ support
FastPower.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 namespace alsutils {
4 namespace math {
5 
6 // This will be nicer when we can finally upgrade to C++14
7 template<int p>
8 struct FastPower {
9  __device__ __host__ static double power(double x, double) {
10  return power_internal(x);
11  }
12 
13  __device__ __host__ static double power_internal(double x);
14 };
15 
16 template<int p>
19 }
20 
21 template<>
23  return x;
24 }
25 }
26 }
#define __host__
Definition: types.hpp:46
__device__ static __host__ double power(double x, double)
Definition: FastPower.hpp:9
__device__ static __host__ double power_internal(double x)
Definition: FastPower.hpp:17
Various utilities for mpi and cuda.
Definition: Factory.hpp:3
#define __device__
Definition: types.hpp:45
Definition: FastPower.hpp:8