PandA-2024.02
examples
MachSuite
MachSuite
md
knn
md.h
Go to the documentation of this file.
1
/*
2
Implemenataion based on:
3
A. Danalis, G. Marin, C. McCurdy, J. S. Meredith, P. C. Roth, K. Spafford, V. Tipparaju, and J. S. Vetter.
4
The scalable heterogeneous computing (shoc) benchmark suite.
5
In Proceedings of the 3rd Workshop on General-Purpose Computation on Graphics Processing Units, 2010.
6
*/
7
8
#include <stdlib.h>
9
#include <stdio.h>
10
#include "support.h"
11
12
#define TYPE double
13
14
// Problem Constants
15
#define nAtoms 256
16
#define maxNeighbors 16
17
// LJ coefficients
18
#define lj1 1.5
19
#define lj2 2.0
20
21
void
md_kernel
(
TYPE
force_x[
nAtoms
],
22
TYPE
force_y[nAtoms],
23
TYPE
force_z[nAtoms],
24
TYPE
position_x[nAtoms],
25
TYPE
position_y[nAtoms],
26
TYPE
position_z[nAtoms],
27
int32_t
NL
[nAtoms*
maxNeighbors
]);
29
// Test harness interface code.
30
31
struct
bench_args_t
{
32
TYPE
force_x
[
nAtoms
];
33
TYPE
force_y
[
nAtoms
];
34
TYPE
force_z
[
nAtoms
];
35
TYPE
position_x
[
nAtoms
];
36
TYPE
position_y
[
nAtoms
];
37
TYPE
position_z
[
nAtoms
];
38
int32_t
NL
[
nAtoms
*
maxNeighbors
];
39
};
md_kernel
void md_kernel(TYPE force_x[nAtoms], TYPE force_y[nAtoms], TYPE force_z[nAtoms], TYPE position_x[nAtoms], TYPE position_y[nAtoms], TYPE position_z[nAtoms], int32_t NL[nAtoms *maxNeighbors])
Definition:
md.c:10
bench_args_t::NL
int32_t NL[nAtoms *maxNeighbors]
Definition:
md.h:38
bench_args_t::position_z
TYPE position_z[nAtoms]
Definition:
md.h:37
NL
#define NL
Definition:
2mm.h:45
maxNeighbors
#define maxNeighbors
Definition:
md.h:16
bench_args_t::position_x
TYPE position_x[nAtoms]
Definition:
md.h:35
bench_args_t::position_y
TYPE position_y[nAtoms]
Definition:
md.h:36
bench_args_t::force_z
TYPE force_z[nAtoms]
Definition:
md.h:34
bench_args_t::force_y
TYPE force_y[nAtoms]
Definition:
md.h:33
bench_args_t::force_x
TYPE force_x[nAtoms]
Definition:
md.h:32
nAtoms
#define nAtoms
Definition:
md.h:15
TYPE
#define TYPE
Definition:
md.h:12
bench_args_t
Definition:
aes.h:18
Generated on Mon Feb 12 2024 13:02:50 for PandA-2024.02 by
1.8.13