OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
GSLCompat.h File Reference
#include <cmath>
#include <limits>
Include dependency graph for GSLCompat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gsl
 GSL-compatible math constants.
 

Macros

#define GSL_REAL(z)   ((z).dat[0])
 
#define GSL_IMAG(z)   ((z).dat[1])
 

Typedefs

typedef void(* gsl_error_handler_t) (const char *reason, const char *file, int line, int gsl_errno)
 Signature of a GSL-style error handler callback.
 

Functions

gsl_error_handler_t gsl_set_error_handler (gsl_error_handler_t handler)
 Set a global error handler and return the previous handler.
 
gsl_error_handler_t gsl_set_error_handler_off ()
 Disable error handling and return a null handler.
 
double gsl_sf_erf (double x)
 Error function \(\mathrm{erf}(x)\).
 
double gsl_sf_pow_int (double x, int n)
 Integer power \(x^n\).
 
double gsl_sf_gamma (double x)
 Gamma function \(\Gamma(x)\).
 
double gsl_sf_fact (unsigned int n)
 Factorial \(n!\) (computed via \(\Gamma(n+1)\) for large \(n\)).
 
double gsl_sf_choose (unsigned int n, unsigned int m)
 Binomial coefficient \(\binom{n}{m}\).
 
double gsl_hypot (double x, double y)
 Hypotenuse \(\sqrt{x^2 + y^2}\) with overflow-safe std::hypot.
 

Variables

constexpr double gsl::GSL_POSINF = std::numeric_limits<double>::infinity()
 
constexpr double gsl::GSL_NEGINF = -std::numeric_limits<double>::infinity()
 
constexpr double gsl::GSL_NAN = std::numeric_limits<double>::quiet_NaN()
 

Macro Definition Documentation

◆ GSL_IMAG

#define GSL_IMAG (   z)    ((z).dat[1])

Definition at line 118 of file GSLCompat.h.

◆ GSL_REAL

#define GSL_REAL (   z)    ((z).dat[0])

Definition at line 117 of file GSLCompat.h.

Typedef Documentation

◆ gsl_error_handler_t

typedef void(* gsl_error_handler_t) (const char *reason, const char *file, int line, int gsl_errno)

Signature of a GSL-style error handler callback.

See also
Documentation on https://www.gnu.org/software/gsl/doc/html/err.html
Implementation on https://www.gnu.org/software/gsl/

Definition at line 27 of file GSLCompat.h.

Function Documentation

◆ gsl_hypot()

double gsl_hypot ( double  x,
double  y 
)
inline

Hypotenuse \(\sqrt{x^2 + y^2}\) with overflow-safe std::hypot.

See also
https://www.gnu.org/software/gsl/doc/html/specfunc.html
Parameters
xInput: first leg.
yInput: second leg.
Returns
Output: \(\sqrt{x^2 + y^2}\).

Definition at line 114 of file GSLCompat.h.

Referenced by TEST_F().

◆ gsl_set_error_handler()

gsl_error_handler_t gsl_set_error_handler ( gsl_error_handler_t  handler)
inline

Set a global error handler and return the previous handler.

Parameters
handlerInput: new error handler.
Returns
Output: previous handler (may be null).

Definition at line 32 of file GSLCompat.h.

Referenced by main(), and TEST_F().

◆ gsl_set_error_handler_off()

gsl_error_handler_t gsl_set_error_handler_off ( )
inline

Disable error handling and return a null handler.

Returns
Output: null handler.

Definition at line 42 of file GSLCompat.h.

Referenced by TEST_F().

◆ gsl_sf_choose()

double gsl_sf_choose ( unsigned int  n,
unsigned int  m 
)
inline

Binomial coefficient \(\binom{n}{m}\).

See also
https://www.gnu.org/software/gsl/doc/html/specfunc.html
Parameters
nInput: total count.
mInput: selected count.
Returns
Output: \(\binom{n}{m}\).

Definition at line 87 of file GSLCompat.h.

Referenced by TEST_F(), and TEST_F().

◆ gsl_sf_erf()

double gsl_sf_erf ( double  x)
inline

Error function \(\mathrm{erf}(x)\).

Parameters
xInput: argument.
Returns
Output: \(\mathrm{erf}(x)\).

Definition at line 50 of file GSLCompat.h.

Referenced by TEST_F().

◆ gsl_sf_fact()

double gsl_sf_fact ( unsigned int  n)
inline

Factorial \(n!\) (computed via \(\Gamma(n+1)\) for large \(n\)).

See also
https://www.gnu.org/software/gsl/doc/html/specfunc.html
Parameters
nInput: non-negative integer.
Returns
Output: \(n!\).

Definition at line 69 of file GSLCompat.h.

Referenced by interpolation::SquarePolynomialVector::Deriv(), interpolation::PPSolveFactory::getDerivPoints(), endfieldmodel::Enge::hN(), TEST_F(), and TEST_F().

◆ gsl_sf_gamma()

double gsl_sf_gamma ( double  x)
inline

Gamma function \(\Gamma(x)\).

See also
https://www.gnu.org/software/gsl/doc/html/specfunc.html
Parameters
xInput: argument.
Returns
Output: \(\Gamma(x)\).

Definition at line 63 of file GSLCompat.h.

Referenced by TEST_F().

◆ gsl_sf_pow_int()