(git:6a2e663)
grid_cpu_collint.h File Reference
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../common/grid_common.h"
#include "../common/grid_library.h"
#include "../common/grid_sphere_cache.h"

Go to the source code of this file.

Macros

#define GRID_MAX_LP_OPTIMIZED   9
 
#define GRID_CONST_WHEN_COLLOCATE
 
#define GRID_CONST_WHEN_INTEGRATE   const
 

Functions

static void __attribute__ ((always_inline)) ortho_cx_to_grid_scalar(const int lp
 Simple loop body for ortho_cx_to_grid using plain C. More...
 
 for (int lxp=0;lxp<=lp;lxp++)
 

Variables

static void const int cmax
 
static void const int const int i
 
static void const int const int const double pol [3][lp+1][2 *cmax+1]
 
static void const int const int const double GRID_CONST_WHEN_COLLOCATE double * cx
 
static void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double * grid_0
 
static void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double * grid_1
 
static void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double * grid_2
 
static void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double * grid_3
 
static void const int kg1
 
static void const int const int kg2
 
static void const int const int const int jg1
 
static void const int const int const int const int jg2
 
static void const int const int const int const int const int const double const int map [3][2 *cmax+1]
 
static void const int const int const int const int const int const double const int const int sections [3][2 *cmax+1]
 
static void const int const int const int const int const int const double const int const int const int npts_local [3]
 
static void const int const int const int const int const int const double const int const int const int int ** sphere_bounds_iter
 
static void const int const int const int const int const int const double const int const int const int int GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double * grid
 
const int ub = 1 - lb
 
static void const int j1
 
static void const int const int j2
 
static void const int const int const int const double GRID_CONST_WHEN_COLLOCATE double * cxy
 

Macro Definition Documentation

◆ GRID_MAX_LP_OPTIMIZED

#define GRID_MAX_LP_OPTIMIZED   9

Definition at line 23 of file grid_cpu_collint.h.

◆ GRID_CONST_WHEN_COLLOCATE

#define GRID_CONST_WHEN_COLLOCATE

Definition at line 29 of file grid_cpu_collint.h.

◆ GRID_CONST_WHEN_INTEGRATE

#define GRID_CONST_WHEN_INTEGRATE   const

Definition at line 30 of file grid_cpu_collint.h.

Function Documentation

◆ __attribute__()

static void __attribute__ ( (always_inline)  ) const
inlinestatic

Simple loop body for ortho_cx_to_grid using plain C.

Transforms coefficients C_xy into C_x by fixing grid index j.

Optimized loop body for ortho_cx_to_grid using AVX2 Intel Intrinsics. This routine always processes four consecutive grid elements at once.

Author
Ole Schuett
Ole Schuett

Collocates coefficients C_x onto the grid for orthorhombic case.

Author
Ole Schuett

◆ for()

for ( int  lxp = 0; lxp <= lp; lxp++)

Definition at line 66 of file grid_cpu_collint.h.

Here is the caller graph for this function:

Variable Documentation

◆ cmax

static void const int const int const int cmax

Definition at line 38 of file grid_cpu_collint.h.

◆ i

void const int const int i

Definition at line 38 of file grid_cpu_collint.h.

◆ pol

static void const int const int const int const double pol

Definition at line 39 of file grid_cpu_collint.h.

◆ cx

static void const int const int const int const int const int const double const int const int const int int GRID_CONST_WHEN_COLLOCATE double * cx

Definition at line 40 of file grid_cpu_collint.h.

◆ grid_0

void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double* grid_0

Definition at line 41 of file grid_cpu_collint.h.

◆ grid_1

void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double* grid_1

Definition at line 42 of file grid_cpu_collint.h.

◆ grid_2

void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double* grid_2

Definition at line 43 of file grid_cpu_collint.h.

◆ grid_3

void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double* grid_3
Initial value:
{
const double reg[4] = {*grid_0, *grid_1, *grid_2, *grid_3}
static void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double * grid_2
static void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double * grid_1
static void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double * grid_0
static void const int const int const double GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double GRID_CONST_WHEN_INTEGRATE double * grid_3

Definition at line 44 of file grid_cpu_collint.h.

◆ kg1

void const int kg1

Definition at line 163 of file grid_cpu_collint.h.

◆ kg2

void const int const int kg2

Definition at line 163 of file grid_cpu_collint.h.

◆ jg1

void const int const int const int jg1

Definition at line 163 of file grid_cpu_collint.h.

◆ jg2

void const int const int const int const int jg2

Definition at line 164 of file grid_cpu_collint.h.

◆ map

void const int const int const int const int const int const double const int map[3][2 *cmax+1]

Definition at line 166 of file grid_cpu_collint.h.

◆ sections

void const int const int const int const int const int const double const int const int sections[3][2 *cmax+1]

Definition at line 167 of file grid_cpu_collint.h.

◆ npts_local

void const int const int const int const int const int const double const int const int const int npts_local[3]

Definition at line 167 of file grid_cpu_collint.h.

◆ sphere_bounds_iter

void const int const int const int const int const int const double const int const int const int int** sphere_bounds_iter

Definition at line 168 of file grid_cpu_collint.h.

◆ grid

void const int const int const int const int const int const double const int const int const int int GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double* grid
Initial value:
{
const int lb = *((*sphere_bounds_iter)++)

Definition at line 169 of file grid_cpu_collint.h.

◆ ub

const int ub = 1 - lb

Definition at line 173 of file grid_cpu_collint.h.

◆ j1

void const int j1

Definition at line 220 of file grid_cpu_collint.h.

◆ j2

void const int const int j2

Definition at line 220 of file grid_cpu_collint.h.

◆ cxy

void const int const int const int const double GRID_CONST_WHEN_COLLOCATE double* cxy

Definition at line 222 of file grid_cpu_collint.h.