af_bessel

The C interface for Bessel functions. More...

afError af_besselh_S (float *d_out, unsigned k, unsigned n, const float *d_in, float nu)
 
afError af_besselh_C (float *d_out, unsigned k, unsigned n, const float *d_in, float nu)
 
afError af_besselh_D (double *d_out, unsigned k, unsigned n, const double *d_in, double nu)
 
afError af_besselh_Z (double *d_out, unsigned k, unsigned n, const double *d_in, double nu)
 
afError af_besseli_S (float *d_out, unsigned n, const float *d_in, float nu)
 
afError af_besseli_C (float *d_out, unsigned n, const float *d_in, float nu)
 
afError af_besseli_D (double *d_out, unsigned n, const double *d_in, double nu)
 
afError af_besseli_Z (double *d_out, unsigned n, const double *d_in, double nu)
 
afError af_besselj_S (float *d_out, unsigned n, const float *d_in, float nu)
 
afError af_besselj_C (cfloat *d_out, unsigned n, const cfloat *d_in, float nu)
 
afError af_besselj_D (double *d_out, unsigned n, const double *d_in, double nu)
 
afError af_besselj_Z (cdouble *d_out, unsigned n, const cdouble *d_in, double nu)
 
afError af_besselk_S (float *d_out, unsigned n, const float *d_in, float nu)
 
afError af_besselk_C (float *d_out, unsigned n, const float *d_in, float nu)
 
afError af_besselk_D (double *d_out, unsigned n, const double *d_in, double nu)
 
afError af_besselk_Z (double *d_out, unsigned n, const double *d_in, double nu)
 
afError af_bessely_S (float *d_out, unsigned n, const float *d_in, float nu)
 
afError af_bessely_C (float *d_out, unsigned n, const float *d_in, float nu)
 
afError af_bessely_D (double *d_out, unsigned n, const double *d_in, double nu)
 
afError af_bessely_Z (double *d_out, unsigned n, const double *d_in, double nu)
 

Detailed Description

The C interface for Bessel functions.

For the canonical Bessel function (and several of its variants), compute the value of the function for each element or the array.

The Bessel functions are the canonical solutions to Bessel's differential equation:

\( x^2 \frac{d^2x}{dx^2} + x \frac{dy}{dx} + (x^2 - \alpha^2)y = 0 \)

Examples:

float ha[] = {1, 2, 3, 4, 5};
array a = array(5, 1, ha);
array out = array(5, 1, f32);
float* p_in = a.device<float>();
float* p_out = out.device<float>();
// Modified first kind
af_besseli_S(p_out, 5, p_in, 2.0);
print(out);
// out =
// 0.1357
// 0.6889
// 2.2452
// 6.4222
// 17.5056
// Canonical first kind
af_besselj_S(p_out, 5, p_in, 2.0);
print(out);
// out =
// 0.1149
// 0.3529
// 0.4881
// 0.3643
// 0.0466
// Modified second kind
af_besselk_S(p_out, 5, p_in, 2.0);
print(out);
// out =
// 1.6248
// 0.2538
// 0.0615
// 0.0174
// 0.0053

Function Documentation

afError af_besselh_S ( float *  d_out,
unsigned  k,
unsigned  n,
const float *  d_in,
float  nu 
)
afError af_besselh_C ( float *  d_out,
unsigned  k,
unsigned  n,
const float *  d_in,
float  nu 
)
afError af_besselh_D ( double *  d_out,
unsigned  k,
unsigned  n,
const double *  d_in,
double  nu 
)
afError af_besselh_Z ( double *  d_out,
unsigned  k,
unsigned  n,
const double *  d_in,
double  nu 
)
afError af_besseli_S ( float *  d_out,
unsigned  n,
const float *  d_in,
float  nu 
)
afError af_besseli_C ( float *  d_out,
unsigned  n,
const float *  d_in,
float  nu 
)
afError af_besseli_D ( double *  d_out,
unsigned  n,
const double *  d_in,
double  nu 
)
afError af_besseli_Z ( double *  d_out,
unsigned  n,
const double *  d_in,
double  nu 
)
afError af_besselj_S ( float *  d_out,
unsigned  n,
const float *  d_in,
float  nu 
)
afError af_besselj_C ( cfloat d_out,
unsigned  n,
const cfloat d_in,
float  nu 
)
afError af_besselj_D ( double *  d_out,
unsigned  n,
const double *  d_in,
double  nu 
)
afError af_besselj_Z ( cdouble d_out,
unsigned  n,
const cdouble d_in,
double  nu 
)
afError af_besselk_S ( float *  d_out,
unsigned  n,
const float *  d_in,
float  nu 
)
afError af_besselk_C ( float *  d_out,
unsigned  n,
const float *  d_in,
float  nu 
)
afError af_besselk_D ( double *  d_out,
unsigned  n,
const double *  d_in,
double  nu 
)
afError af_besselk_Z ( double *  d_out,
unsigned  n,
const double *  d_in,
double  nu 
)
afError af_bessely_S ( float *  d_out,
unsigned  n,
const float *  d_in,
float  nu 
)
afError af_bessely_C ( float *  d_out,
unsigned  n,
const float *  d_in,
float  nu 
)
afError af_bessely_D ( double *  d_out,
unsigned  n,
const double *  d_in,
double  nu 
)
afError af_bessely_Z ( double *  d_out,
unsigned  n,
const double *  d_in,
double  nu 
)