Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfAngle_cuda.h
1/*******************************************************************************
2 * This file is part of mdcore.
3 * Copyright (c) 2022-2024 T.J. Sego
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 ******************************************************************************/
19
20#ifndef _MDCORE_SOURCE_TFANGLE_CUDA_H_
21#define _MDCORE_SOURCE_TFANGLE_CUDA_H_
22
23#include "tfPotential_cuda.h"
24#include <tfAngle.h>
25
26
27namespace TissueForge::cuda {
28
29
30 struct Angle {
31 uint32_t flags;
32 float dissociation_energy;
33 float half_life;
34 int3 pids;
35
37
38 __host__
39 Angle();
40
41 __host__
42 Angle(TissueForge::Angle *a);
43
44 __host__
45 void finalize();
46 };
47
48 int Angle_setThreads(const unsigned int &nr_threads);
49 int Angle_setBlocks(const unsigned int &nr_blocks);
50 int Angle_getDevice();
51 int Angle_toDevice(engine *e);
52 int Angle_fromDevice(engine *e);
53 int Angle_refresh(engine *e);
54 int Angle_refreshAngle(engine *e, AngleHandle *a);
55 int Angle_refreshAngles(engine *e, AngleHandle **angles, int nr_angles);
56
57 int engine_cuda_add_angle(AngleHandle *ah);
58 int engine_cuda_finalize_angle(int aind);
59 int engine_cuda_finalize_angles(engine *e, int *ainds, int nr_angles);
60 int engine_cuda_finalize_angles_all(engine *e);
61 int engine_angle_eval_cuda(struct TissueForge::Angle *angles, int N, struct engine *e, float *epot_out);
62
63};
64
65#endif // _MDCORE_SOURCE_TFANGLE_CUDA_H_
Tissue Forge GPU acceleration on CUDA-supporting devices.
Definition tfAngleConfig.h:26
A handle to an angle bond.
Definition tfAngle.h:137
A bond concerning an angle.
Definition tfAngle.h:60
A Potential object is a compiled interpolation of a given function. The Universe applies potentials t...
Definition tfPotential.h:213
Definition tfEngine.h:164