26 void resize(
const std::vector<uint32_t>& num);
38 inline bool isCPU()
const {
return false; }
39 inline bool isGPU()
const {
return true; }
57 mIndex.assign(src.index());
58 mElements.assign(src.elements());
60 mLists.resize(mIndex.size());
63 for (
int i = 0; i < mIndex.size(); i++)
67 mLists[i].assign(mElements.begin() + mIndex[i], num, num);
81 deviceNum.
resize(num.size());
100 uint32_t totalNum = mReduce.
reduce(num);
108 mInfo.setValue(info);
const DArray< uint32_t > & index() const
VkUniform< ArrayListInfo > mInfo
const DArray< T > & elements() const
void resize(const std::vector< uint32_t > &num)
~ArrayList()
Should not release data here, call Release() explicitly.
VkResizeType resize(uint32_t num, VkBufferUsageFlags usageFlags=0)
implement functions for reducing a range to a single value
T reduce(const std::vector< T > &input)
void scan(std::vector< T > &input, uint ScanType)
This is an implementation of AdditiveCCD based on peridyno.
Array< T, DeviceType::GPU > DArray
ArrayList< ElementType, DeviceType::GPU > DArrayList
bool vkTransfer(VkHostArray< T > &dst, const VkDeviceArray< T > &src)