25 template<
class ElementType, DeviceType deviceType>
class ArrayMap;
27 template<
class ElementType>
36 bool resize(
uint num);
53 inline bool isCPU()
const {
return true; }
54 inline bool isGPU()
const {
return false; }
63 for (
int i = 0; i < aMap.size(); i++)
67 out <<
"Map " << i <<
" (" << mmap.
size() <<
"):";
68 for (
auto it = mmap.
begin(); it != mmap.
end(); it++)
70 std::cout <<
" key:" << it->first <<
" value:" << it->second;
const CArray< Map< int, ElementType > > & maps() const
CArray< Pair< int, ElementType > > m_elements
const CArray< Pair< int, ElementType > > & elements() const
const CArray< uint > & index() const
CArray< Map< int, ElementType > > m_maps
friend std::ostream & operator<<(std::ostream &out, const ArrayMap< ElementType, DeviceType::CPU > &aMap)
ArrayMap< ElementType, DeviceType::CPU > & operator=(const ArrayMap< ElementType, DeviceType::CPU > &)=delete
To avoid erroneous shallow copy.
Be aware do not use this structure on GPU if the data size is large.
DYN_FUNC iterator begin()
This is an implementation of AdditiveCCD based on peridyno.
ArrayMap< T, DeviceType::CPU > CArrayMap
Array< T, DeviceType::CPU > CArray