GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
EnvironmentKokkosAssembly.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
#pragma once
4
24
25
#ifndef GPR_LINALG_KOKKOS
26
#error "EnvironmentKokkosAssembly.h needs -Dlinalg_backend=kokkos"
27
#endif
28
29
#include <Eigen/Core>
30
#include <cstddef>
31
#include <memory>
32
33
#include "
EnvironmentKernelWork.h
"
34
35
namespace
gpr::kokkos_environment
{
36
37
namespace
detail {
38
struct
EnvironmentStorage;
39
}
40
42
class
DeviceEnvironments
{
43
public
:
44
DeviceEnvironments
() =
default
;
45
explicit
DeviceEnvironments
(
46
std::shared_ptr<const detail::EnvironmentStorage>
storage
)
47
: storage_(
std
::move(
storage
))
48
{
49
}
50
51
[[nodiscard]]
bool
empty
() const noexcept
52
{
53
return
!storage_;
54
}
55
[[nodiscard]]
const
detail::EnvironmentStorage*
storage
() const noexcept
56
{
57
return
storage_.get();
58
}
59
60
private
:
61
std::shared_ptr<const detail::EnvironmentStorage> storage_;
62
};
63
65
[[nodiscard]] DeviceEnvironments
upload
(
66
const
gpr::detail::EnvironmentBatchView& source);
67
70
inline
constexpr
std::size_t
default_scratch_bytes
= std::size_t(256) << 20;
71
75
[[nodiscard]] std::size_t
pairsPerChunk
(
const
DeviceEnvironments
& left,
76
const
DeviceEnvironments
& right,
77
int
channel_count,
78
std::size_t scratch_bytes);
79
87
[[nodiscard]] Eigen::VectorXd
assemble
(
88
const
DeviceEnvironments
& left,
const
DeviceEnvironments
& right,
89
const
gpr::detail::EnvironmentPairBatch& batch,
90
std::size_t scratch_bytes =
default_scratch_bytes
);
91
92
}
// namespace gpr::kokkos_environment
EnvironmentKernelWork.h
gpr::kokkos_environment::DeviceEnvironments
Environment data of one configuration set, in execution memory.
Definition
EnvironmentKokkosAssembly.h:42
gpr::kokkos_environment::DeviceEnvironments::DeviceEnvironments
DeviceEnvironments(std::shared_ptr< const detail::EnvironmentStorage > storage)
Definition
EnvironmentKokkosAssembly.h:45
gpr::kokkos_environment::DeviceEnvironments::DeviceEnvironments
DeviceEnvironments()=default
gpr::kokkos_environment::DeviceEnvironments::storage
const detail::EnvironmentStorage * storage() const noexcept
Definition
EnvironmentKokkosAssembly.h:55
gpr::kokkos_environment::DeviceEnvironments::empty
bool empty() const noexcept
Definition
EnvironmentKokkosAssembly.h:51
gpr::kokkos_environment
Definition
EnvironmentKokkosAssembly.cpp:15
gpr::kokkos_environment::upload
DeviceEnvironments upload(const gpr::detail::EnvironmentBatchView &source)
Copy the environments of source to execution memory.
Definition
EnvironmentKokkosAssembly.cpp:93
gpr::kokkos_environment::default_scratch_bytes
constexpr std::size_t default_scratch_bytes
Definition
EnvironmentKokkosAssembly.h:70
gpr::kokkos_environment::pairsPerChunk
std::size_t pairsPerChunk(const DeviceEnvironments &left_environments, const DeviceEnvironments &right_environments, int channel_count, std::size_t scratch_bytes)
Definition
EnvironmentKokkosAssembly.cpp:118
gpr::kokkos_environment::assemble
Eigen::VectorXd assemble(const DeviceEnvironments &left_environments, const DeviceEnvironments &right_environments, const gpr::detail::EnvironmentPairBatch &batch, std::size_t scratch_bytes)
Definition
EnvironmentKokkosAssembly.cpp:137
std
STL namespace.
gpr
covariance_functions
EnvironmentKokkosAssembly.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf