d-SEAMS
Install
Output
Methods
Docs
Engine & CLI
Python
Rust
Julia
R
Lua / Fennel
Fortran
PLUMED
linkcell
Wiki
Cite
GitHub
seams-core
v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Toggle main menu visibility
Loading...
Searching...
No Matches
tum_offload.hpp
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------------
2
// d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
3
//
4
// Copyright (c) 2018--present d-SEAMS core team
5
//
6
// SPDX-License-Identifier: MIT
7
//-----------------------------------------------------------------------------------
8
9
#ifndef SEAMS_TUM_OFFLOAD_H_
10
#define SEAMS_TUM_OFFLOAD_H_
11
12
#include <vector>
13
33
34
namespace
tum
{
35
36
struct
CageCounts
{
37
int
nSix
= 0;
38
int
nHcRings
= 0;
39
int
nDdcRings
= 0;
40
int
nHcAtoms
= 0;
41
int
nDdcAtoms
= 0;
42
int
retries
= 0;
// passes discarded after a buffer overflowed
43
bool
hostFallback
=
false
;
// a row passed kRowCap; hostCageCounts ran
44
bool
usedDevice
=
false
;
45
std::vector<int>
atomSix
;
// six-rings through each atom
46
std::vector<int>
atomHc
;
47
std::vector<int>
atomDdc
;
48
};
49
51
struct
SpecializedCaps
{
52
int
rowCap
= 32;
// ring ids per atom row, at most tum::device::kRowCap
53
int
ringCap
= 0;
// rings; 0 is 16 per atom
54
int
pairCap
= 0;
// basal pairs; 0 is 8 per ring of ringCap
55
// Run the OpenMP target branch when no device is present; it then
56
// executes on the initial device. Has no effect without offload.
57
bool
forceTarget
=
false
;
58
};
59
61
[[nodiscard]]
bool
preferOffload
();
62
65
[[nodiscard]]
CageCounts
hostCageCounts
(
66
const
std::vector<std::vector<int>> &nList);
67
70
[[nodiscard]]
CageCounts
specializedCageCounts
(
71
const
std::vector<std::vector<int>> &nList);
72
74
[[nodiscard]]
CageCounts
75
specializedCageCounts
(
const
std::vector<std::vector<int>> &nList,
76
const
SpecializedCaps
&caps);
77
79
[[nodiscard]]
CageCounts
cageCounts
(
const
std::vector<std::vector<int>> &nList);
80
81
}
// namespace tum
82
83
#endif
tum
Definition
tum_device.hpp:22
tum::specializedCageCounts
CageCounts specializedCageCounts(const std::vector< std::vector< int > > &nList)
Hop-bound six-ring enumerator plus affiliation predicates.
tum::hostCageCounts
CageCounts hostCageCounts(const std::vector< std::vector< int > > &nList)
Host Franzblau six-rings plus cageAffiliation on an index nList (leading self entry,...
tum::cageCounts
CageCounts cageCounts(const std::vector< std::vector< int > > &nList)
preferOffload() selects specializedCageCounts, otherwise hostCageCounts.
tum::preferOffload
bool preferOffload()
True when SEAMS_OFFLOAD is set and is not "0".
tum::CageCounts
Definition
tum_offload.hpp:36
tum::CageCounts::atomHc
std::vector< int > atomHc
Definition
tum_offload.hpp:46
tum::CageCounts::nSix
int nSix
Definition
tum_offload.hpp:37
tum::CageCounts::atomSix
std::vector< int > atomSix
Definition
tum_offload.hpp:45
tum::CageCounts::nHcAtoms
int nHcAtoms
Definition
tum_offload.hpp:40
tum::CageCounts::usedDevice
bool usedDevice
Definition
tum_offload.hpp:44
tum::CageCounts::retries
int retries
Definition
tum_offload.hpp:42
tum::CageCounts::hostFallback
bool hostFallback
Definition
tum_offload.hpp:43
tum::CageCounts::nDdcRings
int nDdcRings
Definition
tum_offload.hpp:39
tum::CageCounts::nHcRings
int nHcRings
Definition
tum_offload.hpp:38
tum::CageCounts::nDdcAtoms
int nDdcAtoms
Definition
tum_offload.hpp:41
tum::CageCounts::atomDdc
std::vector< int > atomDdc
Definition
tum_offload.hpp:47
tum::SpecializedCaps
Initial buffer sizes of the hop-bound path.
Definition
tum_offload.hpp:51
tum::SpecializedCaps::pairCap
int pairCap
Definition
tum_offload.hpp:54
tum::SpecializedCaps::forceTarget
bool forceTarget
Definition
tum_offload.hpp:57
tum::SpecializedCaps::ringCap
int ringCap
Definition
tum_offload.hpp:53
tum::SpecializedCaps::rowCap
int rowCap
Definition
tum_offload.hpp:52
src
include
internal
tum_offload.hpp