21#ifndef dftfeMemoryStorage_h
22#define dftfeMemoryStorage_h
31 template <
typename ValueType, dftfe::utils::MemorySpace memorySpace>
250 const std::
size_t srcOffset,
251 const std::
size_t dstOffset) const;
270 const
MemoryStorage<ValueType, memorySpaceSrc> &srcMemoryStorage);
301 const std::
size_t srcOffset,
302 const std::
size_t dstOffset);
349 const std::
size_t srcOffset,
350 const std::
size_t dstOffset) const;
396 const std::
size_t srcOffset,
397 const std::
size_t dstOffset);
415 copyTo(std::vector<ValueType> &dst) const;
449 const std::
size_t srcOffset,
450 const std::
size_t dstOffset) const;
493 const std::
size_t srcOffset,
494 const std::
size_t dstOffset);
525#include "MemoryStorage.t.cc"
ValueType * iterator
Definition MemoryStorage.h:54
ValueType & reference
Definition MemoryStorage.h:52
iterator end()
Return iterator pointing to the end of Vector data.
Definition MemoryStorage.t.cc:144
void resize(std::size_t size, ValueType initVal=ValueType())
Deallocates and then resizes Vector with new size and initial value arguments.
Definition MemoryStorage.t.cc:47
MemoryStorage & operator=(MemoryStorage &&rhs) noexcept
Move assignment constructor.
Definition MemoryStorage.t.cc:177
const_iterator begin() const
Return iterator pointing to the beginning of Vector data.
Definition MemoryStorage.t.cc:137
std::size_t d_size
Definition MemoryStorage.h:499
~MemoryStorage()
Destructor.
Definition MemoryStorage.t.cc:72
const_iterator end() const
Return iterator pointing to the end of Vector data.
Definition MemoryStorage.t.cc:151
void swap(MemoryStorage &rhs)
Definition MemoryStorage.t.cc:215
MemoryStorage(std::size_t size, ValueType initVal=0)
Constructor for Vector with size and initial value arguments.
Definition MemoryStorage.t.cc:33
size_type * d_data
Definition MemoryStorage.h:498
ValueType * pointer
Definition MemoryStorage.h:51
ValueType value_type
A class template to provide an interface that can act similar to STL vectors but with different Memor...
Definition MemoryStorage.h:50
iterator begin()
Return iterator pointing to the beginning of point data.
Definition MemoryStorage.t.cc:130
void clear()
clear and set to d_data to nullptr
Definition MemoryStorage.t.cc:80
const_reference operator[](std::size_t i) const
Operator to get a const reference to a element of the Vector.
Definition MemoryStorage.t.cc:204
ValueType * data() noexcept
Return the raw pointer to the Vector.
Definition MemoryStorage.t.cc:228
const ValueType & const_reference
Definition MemoryStorage.h:53
MemoryStorage & operator=(const MemoryStorage &rhs)
Copy assignment operator.
Definition MemoryStorage.t.cc:159
void setValue(const ValueType val)
Set all the entries to a given value.
Definition MemoryStorage.t.cc:105
MemoryStorage(MemoryStorage &&u) noexcept
Move constructor for a Vector.
Definition MemoryStorage.t.cc:113
const ValueType * const_iterator
Definition MemoryStorage.h:55
reference operator[](std::size_t i)
Operator to get a reference to a element of the Vector.
Definition MemoryStorage.t.cc:192
void copyTo(MemoryStorage< size_type, memorySpaceDst > &dstMemoryStorage) const
MemoryStorage(const MemoryStorage &u)
Copy constructor for a MemoryStorage.
Definition MemoryStorage.t.cc:92
void copyFrom(const MemoryStorage< size_type, memorySpaceSrc > &srcMemoryStorage)
MemorySpace
Definition MemorySpaceType.h:33
MemoryStorage< ValueType, memorySpaceDst > memoryStorageFromSTL(const std::vector< ValueType > &src)
Create a MemoryStorage object from an input C++ STL vector.
Definition MemoryStorage.t.cc:439
Definition pseudoPotentialToDftfeConverter.cc:34