MD-Bench/lammps/includes/neighbor.h

56 lines
1.2 KiB
C
Raw Permalink Normal View History

2020-08-18 14:27:28 +02:00
/*
* Copyright (C) 2022 NHR@FAU, University Erlangen-Nuremberg.
* All rights reserved. This file is part of MD-Bench.
* Use of this source code is governed by a LGPL-3.0
* license that can be found in the LICENSE file.
2020-08-18 14:27:28 +02:00
*/
#include <atom.h>
#include <parameter.h>
#ifndef __NEIGHBOR_H_
#define __NEIGHBOR_H_
typedef struct {
int *neighbors;
int *numneigh;
} DeviceNeighbor;
2020-08-18 14:27:28 +02:00
typedef struct {
int every;
int ncalls;
int maxneighs;
int half_neigh;
int *neighbors;
int *numneigh;
// Device data
DeviceNeighbor d_neighbor;
2020-08-18 14:27:28 +02:00
} Neighbor;
typedef struct {
MD_FLOAT xprd; MD_FLOAT yprd; MD_FLOAT zprd;
MD_FLOAT bininvx; MD_FLOAT bininvy; MD_FLOAT bininvz;
int mbinxlo; int mbinylo; int mbinzlo;
int nbinx; int nbiny; int nbinz;
int mbinx; int mbiny; int mbinz;
} Neighbor_params;
typedef struct {
int* bincount;
int* bins;
int mbins;
int atoms_per_bin;
} Binning;
2020-08-18 14:27:28 +02:00
extern void initNeighbor(Neighbor*, Parameter*);
extern void setupNeighbor(Parameter*);
2020-08-18 14:27:28 +02:00
extern void binatoms(Atom*);
extern void buildNeighbor_cpu(Atom*, Neighbor*);
extern void sortAtom(Atom*);
#ifdef CUDA_TARGET
extern void buildNeighbor_cuda(Atom*, Neighbor*);
#endif
2020-08-18 14:27:28 +02:00
#endif