Add force calculation kernel and fix incorrect ctest configuration for Cuda tests
This commit is contained in:
parent
cad74747bf
commit
dc74e4e5c0
6 changed files with 348 additions and 6 deletions
19
kernels/forces.cuh
Normal file
19
kernels/forces.cuh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef FORCES_CUH
|
||||
#define FORCES_CUH
|
||||
|
||||
#include "pair_potentials.cuh"
|
||||
#include "precision.hpp"
|
||||
namespace CAC {
|
||||
/**
|
||||
* Calculate forces and energies using CUDA for acceleration
|
||||
* This code currently only accepts a single PairPotential object and does an
|
||||
* n^2 force calculation. Future improvements will:
|
||||
* - Allow for neighbor listing
|
||||
* - Allow for overlaid force calculations
|
||||
*/
|
||||
__global__ void calc_forces_and_energies(real *xs, real *forces, real *energies,
|
||||
int n_particles, real *box_bd,
|
||||
PairPotential &potential);
|
||||
} // namespace CAC
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue