Bolt  1.3
C++ template library with support for OpenCL
Classes | Namespaces | Macros | Typedefs | Functions | Variables
bolt.h File Reference

Define global functions for Bolt CL. More...

#include <CL/cl.h>
#include <CL/cl.hpp>
#include <string>
#include <map>
#include <boost/thread/mutex.hpp>
#include "bolt/BoltVersion.h"
#include "bolt/cl/control.h"
#include "bolt/cl/clcode.h"

Go to the source code of this file.

Classes

class  bolt::cl::KernelTemplateSpecializer
 
struct  bolt::cl::ProgramMapKey
 This structure ensures that a kernel is compiled only once for specified devices. More...
 
struct  bolt::cl::ProgramMapValue
 
struct  bolt::cl::ProgramMapKeyComp
 

Namespaces

namespace  bolt
 Defining namespace for the Bolt project.
 
namespace  bolt::cl
 Namespace containing OpenCL related data types and functions.
 

Macros

#define BOLT_CL_BOLT_H
 
#define __CL_ENABLE_EXCEPTIONS
 
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
 
#define PUSH_BACK_UNIQUE(CONTAINER, ELEMENT)
 
#define V_OPENCL(status, message)   V_OpenCL( status, message, __LINE__ )
 
#define ALIGNED(bound)   __attribute__ ( (aligned( bound ) ) )
 

Typedefs

typedef ::std::map
< ProgramMapKey,
ProgramMapValue,
ProgramMapKeyComp > 
bolt::cl::ProgramMap
 

Functions

std::string bolt::cl::fileToString (const std::string &fileName)
 
::std::vector< ::cl::Kernel > bolt::cl::getKernels (const control &ctl, const ::std::vector< ::std::string > &typeNames, const KernelTemplateSpecializer *const kts, const ::std::vector< ::std::string > &typeDefinitions, const std::string &baseKernelString, const std::string &compileOptions="")
 
void bolt::cl::getVersion (cl_uint &major, cl_uint &minor, cl_uint &patch)
 Query the Bolt library for version information.
 
std::string bolt::cl::clErrorStringA (const cl_int &status)
 Translates an integer OpenCL error code to a std::string at runtime.
 
std::wstring bolt::cl::clErrorStringW (const cl_int &status)
 Translates an integer OpenCL error code to a std::wstring at runtime.
 
cl_int bolt::cl::V_OpenCL (cl_int res, const std::string &msg, size_t lineno)
 Helper print function to stringify OpenCL error codes.
 
void bolt::cl::wait (const bolt::cl::control &ctl,::cl::Event &e)
 
 BOLT_CREATE_TYPENAME (char)
 
 BOLT_CREATE_TYPENAME (cl_char)
 
 BOLT_CREATE_TYPENAME (cl_uchar)
 
 BOLT_CREATE_TYPENAME (cl_short)
 
 BOLT_CREATE_TYPENAME (cl_ushort)
 
 BOLT_CREATE_TYPENAME (cl_int)
 
 BOLT_CREATE_TYPENAME (cl_uint)
 
 BOLT_CREATE_TYPENAME (cl_long)
 
 BOLT_CREATE_TYPENAME (cl_ulong)
 
 BOLT_CREATE_TYPENAME (cl_float)
 
 BOLT_CREATE_TYPENAME (cl_double)
 

Variables

const std::string bolt::cl::binary_search_kernels
 
const std::string bolt::cl::copy_kernels
 
const std::string bolt::cl::count_kernels
 
const std::string bolt::cl::fill_kernels
 
const std::string bolt::cl::gather_kernels
 
const std::string bolt::cl::generate_kernels
 
const std::string bolt::cl::merge_kernels
 
const std::string bolt::cl::min_element_kernels
 
const std::string bolt::cl::reduce_kernels
 
const std::string bolt::cl::reduce_by_key_kernels
 
const std::string bolt::cl::scan_kernels
 
const std::string bolt::cl::scan_by_key_kernels
 
const std::string bolt::cl::scatter_kernels
 
const std::string bolt::cl::sort_kernels
 
const std::string bolt::cl::stablesort_kernels
 
const std::string bolt::cl::stablesort_by_key_kernels
 
const std::string bolt::cl::sort_uint_kernels
 
const std::string bolt::cl::sort_int_kernels
 
const std::string bolt::cl::sort_float_kernels
 
const std::string bolt::cl::sort_common_kernels
 
const std::string bolt::cl::sort_by_key_kernels
 
const std::string bolt::cl::sort_by_key_int_kernels
 
const std::string bolt::cl::sort_by_key_uint_kernels
 
const std::string bolt::cl::transform_kernels
 
const std::string bolt::cl::transform_reduce_kernels
 
const std::string bolt::cl::transform_scan_kernels
 
boost::mutex bolt::cl::programMapMutex
 
ProgramMap bolt::cl::programMap
 

Detailed Description

Define global functions for Bolt CL.

Macro Definition Documentation

#define PUSH_BACK_UNIQUE (   CONTAINER,
  ELEMENT 
)
Value:
if (std::find(CONTAINER.begin(), CONTAINER.end(), ELEMENT) == CONTAINER.end()) \
CONTAINER.push_back(ELEMENT);