try cmake and make. failed now try with julia.
This commit is contained in:
31
src/main.cpp
31
src/main.cpp
@ -1,20 +1,24 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
// opencl
|
||||
#include <CL/cl.hpp>
|
||||
// raylib
|
||||
#include <raylib.h>
|
||||
// #include <raylib.h>
|
||||
// sqllite
|
||||
#include <sqlite3.h>
|
||||
//#include <sqlite3.h>
|
||||
|
||||
//#include "include/layers.hpp"
|
||||
|
||||
#include "include/layers.hpp"
|
||||
|
||||
int main(){
|
||||
// import data
|
||||
sqlite3 *db;
|
||||
|
||||
cl::Platform default_platform=select_platform();
|
||||
std::cout << "Using platform: "<<default_platform.getInfo<CL_PLATFORM_NAME>()<<"\n";
|
||||
|
||||
|
||||
// setup opencl pipeline
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
// setup raylib env
|
||||
@ -24,3 +28,16 @@ int main(){
|
||||
// raylib thread (60fps)
|
||||
// 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