good import.
This commit is contained in:
29
src/main.cpp
29
src/main.cpp
@ -3,7 +3,7 @@
|
||||
#include <vector>
|
||||
|
||||
// opencl
|
||||
#include <CL/cl.hpp>
|
||||
#include <CL/opencl.hpp>
|
||||
// raylib
|
||||
// #include <raylib.h>
|
||||
// sqllite
|
||||
@ -11,12 +11,25 @@
|
||||
|
||||
//#include "include/layers.hpp"
|
||||
|
||||
cl::Platform select_platform (){
|
||||
|
||||
std::vector<cl::Platform> all_platforms;
|
||||
cl::Platform::get(&all_platforms);
|
||||
if(all_platforms.size() == 0)
|
||||
{
|
||||
std::cout << "No Platforms found. Check OpenCl installation!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return all_platforms[0];
|
||||
}
|
||||
|
||||
|
||||
int main(){
|
||||
// import data
|
||||
|
||||
cl::Platform default_platform=select_platform();
|
||||
std::cout << "Using platform: "<<default_platform.getInfo<CL_PLATFORM_NAME>()<<"\n";
|
||||
std::cout << "Using platform: "<< default_platform.getInfo<CL_PLATFORM_NAME>() <<"\n";
|
||||
|
||||
return 0;
|
||||
|
||||
@ -29,15 +42,3 @@ int main(){
|
||||
// opencl sim (every 15 seconds) swap data every 15 seconds
|
||||
}
|
||||
|
||||
cl::Platform select_platform (){
|
||||
|
||||
std::vector<cl::Platform> all_platforms;
|
||||
cl::Platform::get(&all_platforms);
|
||||
if(all_platforms.size() == 0)
|
||||
{
|
||||
std::cout << "No Platforms found. Check OpenCl installation!\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return all_platforms[0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user