libCL closely integrates with OpenCL Studio via the libBind library. All of the demo applications bundled with OpenCL Studio are built upon libCL.

Extending libCL

Under construction ....

#ifndef _oclRadixSort
#define _oclRadixSort

#include "oclProgram.h"
#include "oclBuffer.h"
#include "oclKernel.h"
#include "oclContext.h"

class oclRadixSort : public oclProgram

        oclRadixSort(oclContext& iContext);

        int compile();
        int compute(oclDevice& iDevice, oclBuffer& bfKey);


        static const int cBits = 4;
        static const size_t cBlockSize = 256;

        oclKernel clBlockSort;
        oclKernel clBlockScan;
        oclKernel clBlockPrefix;
        oclKernel clReorder;

        oclBuffer bfTempKey;
        oclBuffer bfTempVal;
        oclBuffer bfBlockScan;
        oclBuffer bfBlockSum;
        oclBuffer bfBlockOffset;

        void fit(oclBuffer& iBuffer, size_t iElements) ;