STORMM Source Documentation
Loading...
Searching...
No Matches
reduction_bridge.h
1// -*-c++-*-
2#ifndef STORMM_REDUCTION_BRIDGE_H
3#define STORMM_REDUCTION_BRIDGE_H
4
5#include "copyright.h"
6#include "Accelerator/hybrid.h"
7#include "Constants/behavior.h"
8
9namespace stormm {
10namespace stmath {
11
12using card::Hybrid;
13using card::HybridTargetLevel;
14using constants::CartesianDimension;
15
19public:
24 ReductionBridge(size_t n_values);
25
31 ReductionBridge(const ReductionBridge &original);
32 ReductionBridge& operator=(const ReductionBridge &original);
33 ReductionBridge(ReductionBridge &&original) = default;
34 ReductionBridge& operator=(ReductionBridge &&original) = default;
36
38 size_t size() const;
39
49 const double* getPointer(CartesianDimension cdim,
50 HybridTargetLevel tier = HybridTargetLevel::HOST) const;
51 double* getPointer(CartesianDimension cdim, HybridTargetLevel tier = HybridTargetLevel::HOST);
53
54private:
55 Hybrid<double> x_buffer;
59 Hybrid<double> y_buffer;
60 Hybrid<double> z_buffer;
61 Hybrid<double> storage;
62};
63
64} // namespace stmath
65} // namespace stormm
66
67#endif
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
ReductionBridge(size_t n_values)
Definition reduction_bridge.cpp:11
size_t size() const
Get the number of values that each of the three arrays in this object can store.
Definition reduction_bridge.cpp:51
const double * getPointer(CartesianDimension cdim, HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get pointers to one of the buffers.
Definition reduction_bridge.cpp:56
ReductionBridge(size_t n_values)
Definition reduction_bridge.cpp:11