MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / alloc

Method alloc

cpp/5_Domain_Specific/smokeParticles/GpuArray.h:117–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115template <class T> GpuArray<T>::~GpuArray() { free(); }
116
117template <class T> void GpuArray<T>::alloc(size_t size, bool vbo, bool doubleBuffer, bool useElementArray)
118{
119 m_size = size;
120
121 m_useVBO = vbo;
122 m_doubleBuffer = doubleBuffer;
123
124 if (m_doubleBuffer) {
125 m_currentWrite = 1;
126 }
127
128 allocHost();
129
130 if (vbo) {
131 allocVbo(useElementArray);
132 }
133 else {
134 allocDevice();
135 }
136}
137
138template <class T> void GpuArray<T>::free()
139{

Callers 1

_initializeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected