PandA-2024.02
md.h
Go to the documentation of this file.
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <string.h>
4 #include "support.h"
5 
6 #define TYPE double
7 
8 // Problem Constants
9 #define nAtoms 256
10 #define domainEdge 20.0
11 #define blockSide 4
12 //#define blockSide 1
13 #define nBlocks (blockSide*blockSide*blockSide)
14 #define blockEdge (domainEdge/((TYPE)blockSide))
15 // Memory Bound
16 // This is an artifact of using statically-allocated arrays. We'll pretend that
17 // it doesn't exist and instead track the actual number of points.
18 #define densityFactor 10
19 // LJ coefficients
20 #define lj1 1.5
21 #define lj2 2.0
22 
23 typedef struct {
24  TYPE x, y, z;
25 } dvector_t;
26 typedef struct {
27  int32_t x, y, z;
28 } ivector_t;
29 
30 void md( int32_t n_points[blockSide][blockSide][blockSide],
31  dvector_t force[blockSide][blockSide][blockSide][densityFactor],
32  dvector_t position[blockSide][blockSide][blockSide][densityFactor]
33  );
35 // Test harness interface code.
36 
37 struct bench_args_t {
41 };
#define blockSide
Definition: md.h:11
TYPE z
Definition: md.h:24
#define TYPE
Definition: md.h:6
int32_t z
Definition: md.h:27
Definition: md.h:26
Definition: md.h:23
void md(int32_t n_points[blockSide][blockSide][blockSide], dvector_t force[blockSide][blockSide][blockSide][densityFactor], dvector_t position[blockSide][blockSide][blockSide][densityFactor])
dvector_t position[blockSide][blockSide][blockSide][densityFactor]
Definition: md.h:40
int32_t n_points[blockSide][blockSide][blockSide]
Definition: md.h:38
#define densityFactor
Definition: md.h:18
dvector_t force[blockSide][blockSide][blockSide][densityFactor]
Definition: md.h:39
x
Return the smallest n such that 2^n >= _x.

Generated on Mon Feb 12 2024 13:02:50 for PandA-2024.02 by doxygen 1.8.13