1#ifndef IPPL_RANDOM_UTILITY_H
2#define IPPL_RANDOM_UTILITY_H
4#include <Kokkos_MathematicalConstants.hpp>
5#include <Kokkos_MathematicalFunctions.hpp>
6#include <Kokkos_Random.hpp>
27 template <
typename T,
class Distribution>
52 KOKKOS_INLINE_FUNCTION
void solve(
unsigned int d,
T& x,
T& u) {
53 unsigned int iter = 0;
56 x = x - (
dist.getObjFunc(x, d, u) /
dist.getDerObjFunc(x, d));
The class that represents a distribution.
KOKKOS_FUNCTION ~NewtonRaphson()=default
KOKKOS_INLINE_FUNCTION NewtonRaphson(const Distribution &dist_)
KOKKOS_INLINE_FUNCTION void solve(unsigned int d, T &x, T &u)
Solve an equation using the Newton-Raphson method.
KOKKOS_FUNCTION NewtonRaphson()=default