A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/KhronosGroup/libclcxx below:

KhronosGroup/libclcxx: OpenCL specific C++ libraries implemented in C++ for OpenCL kernel language published in releases of OpenCL-Docs

This repository contains libraries for C++ for OpenCL Kernel Language published in releases of OpenCL-Docs. The libraries can be used with kernels written in C++ for OpenCL and compiled by clang 12 onwards, refer to clang manual for more details.

This repository makes use of functionality from the llvm-project i.e. clang and libcxx.

List of currently supported libraries
  1. Type traits

Example usage:

#include <opencl_type_traits>

using sint_type = std::make_signed<unsigned int>::type;
using sint4_type = std::make_signed<uint4>::type;


template<typename T>
void foo(T *par){
  typename std::remove_address_space<T>::type var;
}

__kernel void bar(__global int * ptr) {
  foo(ptr);
  static_assert(!std::is_same<sint_type, unsigned int>::value);
  static_assert(!std::is_same<sint4_type, uint4>::value);
}

This library is implamented fully in header file therefore only include file path need to be added during compilation.

$ clang -I<path to libclcxx build or install location>/include test.clcpp
  1. Placement new from standard C++, for more information refer to https://en.cppreference.com/w/cpp/language/new.

Example usage:

#include <opencl_new>

class B{
public:
	B(int num = 24)
	: x(num) {}
private:
	int x;
};

void foo(B **b){
	*b = new (buffer) B;
}

This library is implamented fully in header file therefore only include file path need to be added during compilation.

$ clang -I<path to libclcxx build or install location>/include test.clcpp
Getting the source code and building libclcxx
  1. Clone libclcxx:

  2. Configure and build libclcxx and its dependencies:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4