STARS-H
Software for Testing Accuracy, Reliability and Scalability of Hierarchical computations
starsh-electrostatics.h
Go to the documentation of this file.
1 
13 #ifndef __STARSH_ELECTROSTATICS_H__
14 #define __STARSH_ELECTROSTATICS_H__
15 
30 // Add definitions for size_t, va_list, STARSH_kernel and STARSH_particles
31 #include "starsh.h"
32 #include "starsh-particles.h"
33 
36 
39 
45 {
54 };
55 
58 
67 {
72 };
73 
74 int starsh_esdata_new(STARSH_esdata **data, STARSH_int count, int ndim);
75 int starsh_esdata_init(STARSH_esdata **data, STARSH_int count, int ndim,
76  double *point);
78  enum STARSH_PARTICLES_PLACEMENT place);
80  va_list args);
81 int starsh_esdata_generate_el(STARSH_esdata **data, STARSH_int count, ...);
85 
86 // KERNELS
87 
88 void starsh_esdata_block_coulomb_potential_kernel_1d(int nrows, int ncols,
89  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
90  void *result, int ld);
91 void starsh_esdata_block_coulomb_potential_kernel_2d(int nrows, int ncols,
92  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
93  void *result, int ld);
94 void starsh_esdata_block_coulomb_potential_kernel_3d(int nrows, int ncols,
95  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
96  void *result, int ld);
97 void starsh_esdata_block_coulomb_potential_kernel_4d(int nrows, int ncols,
98  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
99  void *result, int ld);
100 void starsh_esdata_block_coulomb_potential_kernel_nd(int nrows, int ncols,
101  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
102  void *result, int ld);
103 
105  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
106  void *result, int ld);
108  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
109  void *result, int ld);
111  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
112  void *result, int ld);
114  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
115  void *result, int ld);
117  STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data,
118  void *result, int ld);
119 
120 #endif // __STARSH_ELECTROSTATICS_H__
121 
int starsh_esdata_generate(STARSH_esdata **data, STARSH_int count, int ndim, enum STARSH_PARTICLES_PLACEMENT place)
Generate STARSH_esdata object by given distribution.
Definition: electrostatics.c:92
ssize_t STARSH_int
STARSH signed integer to support more, than MAX_INT rows/columns.
Definition: starsh.h:64
void starsh_esdata_block_coulomb_potential_kernel_3d(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for 3-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_3d.c:31
STARSH_ELECTROSTATICS_PARAM
List of parameters for starsh_application().
Definition: starsh-electrostatics.h:56
#define ndim
Replace variable ndim with static integer value.
Definition: kernel_sin_1d.c:28
int starsh_esdata_generate_va(STARSH_esdata **data, STARSH_int count, va_list args)
Generate STARSH_esdata object with incomplete set of parameters.
Definition: electrostatics.c:120
STARSH_ELECTROSTATICS_KERNEL
List of built-in kernels for starsh_esdata_get_kernel().
Definition: starsh-electrostatics.h:37
int starsh_esdata_new(STARSH_esdata **data, STARSH_int count, int ndim)
Allocate memory for STARSH_esdata object.
Definition: electrostatics.c:17
void starsh_esdata_block_coulomb_potential_kernel_nd(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for n-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_nd.c:31
STARSH_particles STARSH_esdata
Electrostatics problem reuses structure for particles.
Definition: starsh-electrostatics.h:35
Definition: starsh-electrostatics.h:50
Definition: starsh-electrostatics.h:46
void starsh_esdata_free(STARSH_esdata *data)
Free memory of STARSH_esdata object.
Definition: electrostatics.c:221
void STARSH_kernel(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Definition: starsh.h:68
void starsh_esdata_block_coulomb_potential_kernel_2d(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for 2-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_2d.c:31
void starsh_esdata_block_coulomb_potential_kernel_4d(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for 4-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_4d.c:31
void starsh_esdata_block_coulomb_potential_kernel_nd_simd(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for n-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_nd.c:101
STARSH_PARTICLES_PLACEMENT
Distribution of particles for starsh_particles_generate().
Definition: starsh-particles.h:51
void starsh_esdata_block_coulomb_potential_kernel_4d_simd(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for 4-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_4d.c:101
void starsh_esdata_block_coulomb_potential_kernel_2d_simd(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for 2-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_2d.c:101
int starsh_esdata_get_kernel(STARSH_kernel **kernel, STARSH_esdata *data, enum STARSH_ELECTROSTATICS_KERNEL type)
Get kernel for electrostatics problem.
Definition: electrostatics.c:330
void starsh_esdata_block_coulomb_potential_kernel_1d(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for 1-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_1d.c:31
Dimensionality of space (ndim, integer).
Definition: starsh-electrostatics.h:68
int starsh_esdata_generate_el(STARSH_esdata **data, STARSH_int count,...)
Generate STARSH_esdata object with incomplete set of parameters.
Definition: electrostatics.c:179
Distribution of particles (place, STARSH_PARTICLES_PLACEMENT).
Definition: starsh-electrostatics.h:70
int starsh_esdata_init(STARSH_esdata **data, STARSH_int count, int ndim, double *point)
Initialize STARSH_esdata object by given data.
Definition: electrostatics.c:52
Structure for general N-body problems.
Definition: starsh-particles.h:36
void starsh_esdata_block_coulomb_potential_kernel_1d_simd(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for 1-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_1d.c:101
void starsh_esdata_block_coulomb_potential_kernel_3d_simd(int nrows, int ncols, STARSH_int *irow, STARSH_int *icol, void *row_data, void *col_data, void *result, int ld)
Coulomb potential for 3-dimensional electrostatics problem.
Definition: kernel_coulomb_potential_3d.c:101