File indexing completed on 2025-09-16 08:57:16
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include <memory>
0010
0011 #include "corecel/Macros.hh"
0012 #include "corecel/Types.hh"
0013 #include "corecel/cont/Span.hh"
0014
0015 namespace celeritas
0016 {
0017 class ImageParams;
0018
0019
0020
0021
0022
0023
0024
0025 class ImageInterface
0026 {
0027 public:
0028
0029
0030 using int_type = int;
0031 using SpanInt = Span<int_type>;
0032 using SPConstParams = std::shared_ptr<ImageParams const>;
0033
0034
0035 public:
0036
0037 virtual ~ImageInterface() = default;
0038
0039
0040 virtual SPConstParams const& params() const = 0;
0041
0042
0043 virtual void copy_to_host(SpanInt) const = 0;
0044
0045 protected:
0046 ImageInterface() = default;
0047 CELER_DEFAULT_COPY_MOVE(ImageInterface);
0048 };
0049
0050
0051 template<MemSpace M>
0052 class Image;
0053
0054
0055
0056
0057
0058 class ImagerInterface
0059 {
0060 public:
0061
0062 virtual ~ImagerInterface() = default;
0063
0064
0065
0066 virtual void operator()(Image<MemSpace::host>*) = 0;
0067 virtual void operator()(Image<MemSpace::device>*) = 0;
0068
0069
0070 protected:
0071 ImagerInterface() = default;
0072 CELER_DEFAULT_COPY_MOVE(ImagerInterface);
0073 };
0074
0075
0076 }