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

Method depthSort

cpp/5_Domain_Specific/smokeParticles/ParticleSystem.cpp:133–150  ·  view source on GitHub ↗

depth sort the particles

Source from the content-addressed store, hash-verified

131
132// depth sort the particles
133void ParticleSystem::depthSort()
134{
135 if (!m_doDepthSort) {
136 return;
137 }
138
139 m_pos.map();
140 m_indices.map();
141
142 // calculate depth
143 calcDepth(m_pos.getDevicePtr(), m_sortKeys.getDevicePtr(), m_indices.getDevicePtr(), m_sortVector, m_numParticles);
144
145 // radix sort
146 sortParticles(m_sortKeys.getDevicePtr(), m_indices.getDevicePtr(), m_numParticles);
147
148 m_pos.unmap();
149 m_indices.unmap();
150}
151
152uint *ParticleSystem::getSortedIndices()
153{

Callers 1

displayFunction · 0.80

Calls 3

mapMethod · 0.80
getDevicePtrMethod · 0.80
unmapMethod · 0.80

Tested by

no test coverage detected