MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / BitonicSort

Method BitonicSort

Source/Falcor/Utils/Algorithm/BitonicSort.cpp:38–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36static const char kShaderFilename[] = "Utils/Algorithm/BitonicSort.cs.slang";
37
38BitonicSort::BitonicSort(ref<Device> pDevice) : mpDevice(pDevice)
39{
40#if !FALCOR_NVAPI_AVAILABLE
41 FALCOR_THROW("BitonicSort requires NVAPI. See installation instructions in README.");
42#endif
43 mSort.pState = ComputeState::create(mpDevice);
44
45 // Create shaders
46 DefineList defines;
47 defines.add("CHUNK_SIZE", "256"); // Dummy values just so we can get reflection data. We'll set the actual values in execute().
48 defines.add("GROUP_SIZE", "256");
49 mSort.pProgram = Program::createCompute(mpDevice, kShaderFilename, "main", defines);
50 mSort.pState->setProgram(mSort.pProgram);
51 mSort.pVars = ProgramVars::create(mpDevice, mSort.pProgram.get());
52}
53
54bool BitonicSort::execute(RenderContext* pRenderContext, ref<Buffer> pData, uint32_t totalSize, uint32_t chunkSize, uint32_t groupSize)
55{

Callers

nothing calls this directly

Calls 4

createComputeFunction · 0.85
createFunction · 0.50
addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected