Hex  1.0 Hydrogen-electron collision solver
kernels.cl File Reference

## Macros

#define NDIAG   ((2*ORDER+1)*(2*ORDER+1))

#define NROW   (NSPLINE * NSPLINE)

#define NCOL   (NSPLINE * NSPLINE)

## Functions

double2 cpxm (double2 a, double2 b)
Complex multiplication. More...

kernel void a_vec_b_vec (private double2 a, global double2 *x, private double2 b, global double2 *y)
AXBY operation. More...

kernel void vec_mul_vec (global double2 *a, global double2 *b, global double2 *c)
Vector-vector multiplication. More...

kernel void vec_norm (global double2 *v, global double *n)
Per-element square of a vector. More...

kernel void scalar_product (global double2 *u, global double2 *v, global double2 *z)
Full scalar product. More...

kernel void norm (global double2 *v, global double *z)
Full vector norm. More...

kernel void DIA_dot_vec (global double2 *A, global double2 *x, global double2 *y)
DIA-matrix-vector multiplication. More...

## Macro Definition Documentation

 #define NCOL   (NSPLINE * NSPLINE)
 #define NDIAG   ((2*ORDER+1)*(2*ORDER+1))
 #define NROW   (NSPLINE * NSPLINE)

## Function Documentation

 kernel void a_vec_b_vec ( private double2 a, global double2 * x, private double2 b, global double2 * y )

Computes the linear combination $$ax + by$$ of vectors $$x$$ and $$y$$ and stores the result in $$x$$.

 double2 cpxm ( double2 a, double2 b )
inline

Multiplies two complex numbers and returns the product.

 kernel void DIA_dot_vec ( global double2 * A, global double2 * x, global double2 * y )

The input matrix is supplied in the form of zero-padded concatenated diagonals. For example, the matrix

$A = \pmatrix { a_{11} & a_{12} & & & \cr a_{21} & a_{22} & a_{23} & & \cr & a_{32} & a_{33} & a_{34} & \cr & & a_{43} & a_{44} & a_{45} \cr & & & a_{54} & a_{55} \cr }$

$A' = \pmatrix { 0 & a_{11} & a_{12} \cr a_{21} & a_{22} & a_{23} \cr a_{32} & a_{33} & a_{34} \cr a_{43} & a_{44} & a_{45} \cr a_{54} & a_{55} & 0 \cr }$

and sent in as a 1D array

$A'' = [0, a_{21} , a_{32}, a_{43}, a_{54}; a_{11}, a_{22}, a_{33}, a_{44}, a_{55}; a_{12}, a_{23}, a_{34}, a_{45}, 0] \ .$

 kernel void norm ( global double2 * v, global double * z )
 kernel void scalar_product ( global double2 * u, global double2 * v, global double2 * z )
 kernel void vec_mul_vec ( global double2 * a, global double2 * b, global double2 * c )

Computes per-element vector-vector multiplication $$a * b$$ and stores the resulting vector in $$c$$,

 kernel void vec_norm ( global double2 * v, global double * n )

Similarly to vec_mul_vec, computes a per-element square of a given vector $$v$$ and stores the result in the vector given as the second argument.