This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello: hello.cpp | |
g++ -std=c++0x -o hello hello.cpp -lOpenCL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VEXCL_ROOT=/usr/include | |
hello: hello.cpp | |
g++ -std=c++0x -o hello hello.cpp -I$(VEXCL_ROOT) -lOpenCL -lboost_system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* third.cpp | |
* Date: 2012-11-01 | |
* Author: Karsten Ahnert (karsten.ahnert@gmx.de) | |
*/ | |
#include <iostream> | |
#include <boost/utility/enable_if.hpp> | |
#define tab "\t" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef A_H | |
#define A_H | |
template <class T> | |
struct A { | |
static int a; | |
}; | |
template <class T> | |
int A<T>::a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <stdexcept> | |
#define __CL_ENABLE_EXCEPTIONS | |
#include <CL/cl.hpp> | |
//--------------------------------------------------------------------------- | |
void precondition(bool cond, const std::string &msg) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <stdexcept> | |
#define __CL_ENABLE_EXCEPTIONS | |
#include <CL/cl.hpp> | |
//--------------------------------------------------------------------------- | |
void precondition(bool cond, const std::string &msg) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if defined(cl_khr_fp64) | |
# pragma OPENCL EXTENSION cl_khr_fp64: enable | |
#elif defined(cl_amd_fp64) | |
# pragma OPENCL EXTENSION cl_amd_fp64: enable | |
#endif | |
typedef double real; | |
real read_x( | |
long g_id, | |
ulong n, | |
char has_left, char has_right, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vexcl/vexcl.hpp> | |
#include <vexcl/external/boost_compute.hpp> | |
int main() { | |
const size_t n = 1 << 20; | |
const size_t m = 1 << 10; | |
vex::Context ctx( vex::Filter::Env && vex::Filter::Count(1) ); | |
std::cout << ctx << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zero: zero.cpp | |
g++ -std=c++0x -o zero zero.cpp -lOpenCL |
OlderNewer