 
 int main(int argc, char *argv[])
 {
-    Saiga::CUDA::initCUDA();
-
     radixSortTest();
-
-    Saiga::CUDA::destroyCUDA();
-
     cout << "Done." << endl;
 }
 

    Saiga::thrust::pinned_vector<T> h_data(N), res;
    thrust::device_vector<T> d_data(N);

    for(auto& f : h_data)
    {
        f = abs(rand());

    }
    d_data = h_data;

    cout << "Sorting " << N << " elements..." << endl;



    radixSort(d_data);


    res = d_data;

    int prev = res[0];
    for(auto& d : res)
    {

#include "thrust/scan.h"
#include "thrust/scatter.h"

template<bool one>
struct GetBitOp
{
