9        if (m_nx != src.size() || m_ny != src.size()) {
 
   10            this->resize(src.nx(), src.ny());
 
   39        Array2DInfo getInfo() { 
return m_data.getInfo(); }
 
   41        inline const VkDeviceArray2D<T>* handle()
 const { 
return &m_data; }
 
   42        inline VkDeviceArray2D<T>* handle() { 
return &m_data; }
 
   44        VkBuffer buffer()
 const { 
return m_data.bufferHandle(); }
 
   46        uint32_t bufferSize() { 
return m_data.bufferSize(); }
 
   48        inline T* begin()
 const { 
return m_data; }
 
   50        inline uint nx()
 const { 
return m_nx; }
 
   51        inline uint ny()
 const { 
return m_ny; }
 
   73        inline int index(
const uint i, 
const uint j)
 const 
   88        DYN_FUNC 
inline uint size()
 const { 
return m_nx * m_ny; }
 
   89        DYN_FUNC 
inline bool isCPU()
 const { 
return false; }
 
   90        DYN_FUNC 
inline bool isGPU()
 const { 
return true; }
 
   92        void assign(
const Array2D<T, DeviceType::GPU>& src);
 
   93        void assign(
const Array2D<T, DeviceType::CPU>& src);
 
   99        VkDeviceArray2D<T> m_data;
 
  108        uint total = nx * ny;
 
  109        if (m_data.size() == total) 
return;
 
  116        m_data.resize(nx, ny);
 
  141        if (m_nx != src.size() || m_ny != src.size()){
 
  142            this->resize(src.nx(), src.ny());
 
  153        if (m_nx != src.size() || m_ny != src.size()) {
 
  154            this->resize(src.nx(), src.ny());
 
This is an implementation of AdditiveCCD based on peridyno.
 
Array2D< T, DeviceType::GPU > DArray2D
 
bool vkTransfer(VkHostArray< T > &dst, const VkDeviceArray< T > &src)