Class BitonicSort
Bitonic Sort implementation using GPU compute shaders. It has a complexity of O(n*(log n)^2), which is inferior to most traditional sorting algorithms, but because GPUs have so many threads, and because each thread can be utilized, the algorithm can fully load the GPU, taking advantage of its high ALU and bandwidth capabilities.
Assembly: FlaxEngine.dll
File: Engine/Renderer/Utils/BitonicSort.h
Syntax
public class BitonicSort : public RendererPass
Methods
Dispose()
Cleanup service data.
Declaration
public virtual void Dispose() override
Overrides
Init()
Initialize service.
Declaration
public virtual bool Init() override
Returns
bool
|
Overrides
OnShaderReloading(Asset* obj)
setupResources()
Declaration
protected virtual bool setupResources() override
Returns
bool
|
Overrides
Sort(GPUContext* context, GPUBuffer* sortingKeysBuffer, GPUBuffer* countBuffer, uint32 counterOffset, bool sortAscending, GPUBuffer* sortedIndicesBuffer)
Sorts the specified buffer of index-key pairs.
Declaration
public void Sort(GPUContext* context, GPUBuffer* sortingKeysBuffer, GPUBuffer* countBuffer, uint32 counterOffset, bool sortAscending, GPUBuffer* sortedIndicesBuffer)
Parameters
GPUContext
context
The GPU context. |
GPUBuffer
sortingKeysBuffer
The sorting keys buffer. Used as a structured buffer of type Item (see above). |
GPUBuffer
countBuffer
The buffer that contains a items counter value. |
uint32
counterOffset
The offset into counter buffer to find count for this list. Must be a multiple of 4 bytes. |
bool
sortAscending
True to sort in ascending order (smallest to largest), otherwise false to sort in descending order. |
GPUBuffer
sortedIndicesBuffer
The output buffer for sorted values extracted from the sorted sortingKeysBuffer after algorithm run. Valid for uint value types - used as RWBuffer. |
ToString()
Gets the string representation of this object.
Declaration
public virtual String ToString() const override
Returns
String
|