29 public std::enable_shared_from_this<Memory<T> > {
66 virtual std::shared_ptr<Memory<T> >
makeInstance()
const = 0;
151 size_t bufferLength)
const = 0;
160 size_t bufferLength) = 0;
248 size_t startY,
size_t endY,
249 size_t startZ,
size_t endZ,
250 T* output,
size_t outputSize) = 0;
310 virtual const std::shared_ptr<const Memory<T> >
getHostMemory()
const = 0;
322 const ivec3& end)
const = 0;
335 const ivec3& end)
const = 0;
virtual void copyInternalCells(size_t startX, size_t endX, size_t startY, size_t endY, size_t startZ, size_t endZ, T *output, size_t outputSize)=0
copyInternalCells copies the internal cells into the memory area This is ideal for removing ghost cel...
Memory(size_t nx, size_t ny, size_t nz)
Memory constructs new memory.
Definition: Memory.cpp:21
virtual size_t getExtentYInBytes() const
Definition: Memory.cpp:52
virtual void operator-=(const Memory< T > &other)=0
virtual void addLinearCombination(T a1, T a2, const Memory< T > &v2, T a3, const Memory< T > &v3, T a4, const Memory< T > &v4, T a5, const Memory< T > &v5)=0
virtual void copyToHost(T *bufferPointer, size_t bufferLength) const =0
View< T > getView()
getView gets the view to the memory
Definition: Memory.cpp:57
const size_t ny
Definition: Memory.hpp:341
T & operator[](size_t i)
Definition: Memory.hpp:109
const T * data() const
Definition: Memory.hpp:105
virtual size_t getSizeX() const
Definition: Memory.cpp:32
virtual bool isOnHost() const =0
virtual std::shared_ptr< Memory< T > > getHostMemory()=0
Copies the data to host if it is on GPU, otherwise makes a copy.
T operator()(int x, int y, int z) const
Definition: Memory.hpp:120
double real
Definition: types.hpp:65
virtual void subtractPower(const Memory< T > &other, double power)=0
Definition: Memory.hpp:28
virtual ~Memory()
Definition: Memory.hpp:43
virtual void operator/=(const Memory< T > &other)=0
const size_t nx
Definition: Memory.hpp:340
virtual void addPower(const Memory< T > &other, double power)=0
virtual size_t getExtentXInBytes() const
Definition: Memory.cpp:47
virtual T * getPointer()=0
virtual void copyFromHost(const T *bufferPointer, size_t bufferLength)=0
virtual std::shared_ptr< Memory< T > > makeInstance() const =0
Clones the memory area, but does not copy the content
virtual real getTotalVariation(int p, const ivec3 &start, const ivec3 &end) const =0
virtual size_t getSizeZ() const
Definition: Memory.cpp:42
virtual void makeZero()=0
makeZero sets every element to zero (0)
T operator[](size_t i) const
Definition: Memory.hpp:114
virtual void operator+=(const Memory< T > &other)=0
const size_t nz
Definition: Memory.hpp:342
virtual void copyFrom(const Memory< T > &other)=0
Copies the contents of the other memory area into this one.
Various utility functions to implement the tecno flux.
Definition: types.hpp:30
float p
Definition: sodshocktube.py:5
Definition: MemoryBase.hpp:24
T * data()
Definition: Memory.hpp:101
T & operator()(int x, int y, int z)
Definition: Memory.hpp:124
virtual void operator*=(const Memory< T > &other)=0
virtual size_t getSizeY() const
Definition: Memory.cpp:37
virtual size_t getSize() const
Definition: Memory.cpp:27