在windows上运行opencl使用了三个软件
1.CMake
2.NVIDIA GPU Computing SDK
3.visual studio 2010
大概原理是,通过CMake来将编译器和opencl库等进行统一融合和管理。
其中/code目录中中需要预先存放
其中CMakeLists.txt目前为最简单版的
cmake_minimum_required (VERSION 2.6)
project (Tutorial)
add_executable(Tutorial tutorial.cxx)
tutorial.cxx中为需要编译的代码
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main (int argc, char *argv[])
{
if (argc < 2)
{
fprin