This module implements a priority queue adaptor, supporting O(log(N)) push/pop operations. Unlike std::priority_queue, this class can be used both in host and device CUDA code:
Example
typedef vector_view<uint32*> vector_type;
typedef priority_queue<uint32, vector_type> queue_type;
queue_type queue( vector_type( 0u, queue_storage ) );
queue.push( 3 );
queue.push( 8 );
queue.push( 1 );
queue.push( 5 );
printf( "%u\n", queue.top() );
queue.pop();
printf( "%u\n", queue.top() );
queue.pop();
printf( "%u\n", queue.top() );
queue.pop();
printf( "%u\n", queue.top() );