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

Method allocDevice

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

Source from the content-addressed store, hash-verified

159}
160
161template <class T> void GpuArray<T>::allocDevice()
162{
163 checkCudaErrors(cudaMalloc((void **)&m_dptr[0], m_size * sizeof(T)));
164
165 if (m_doubleBuffer) {
166 checkCudaErrors(cudaMalloc((void **)&m_dptr[1], m_size * sizeof(T)));
167 }
168}
169
170template <class T> void GpuArray<T>::freeDevice()
171{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected