Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions GenerationDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
#include <memory>
#include <string>
#include <exception>

#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif

#include "constants.h"
#include "DeviceConfig.h"
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ OPENCL_LIB = ../_opencl/lib/win/x86
CC = g++
CC_FLAGS = -W -Wall -std=c++11 -O3 -I$(OPENCL_INCLUDE) -m$(PLATFORM)
LD = g++
ifeq ($(shell uname),Darwin)
LD_FLAGS = -fPIC -L$(OPENCL_LIB) -framework OpenCL -m$(PLATFORM)
else
LD_FLAGS = -fPIC -L$(OPENCL_LIB) -lOpenCL -m$(PLATFORM)
endif

ECHO = echo
MKDIR = mkdir
Expand Down
5 changes: 5 additions & 0 deletions OpenclDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
#include <exception>
#include <vector>
#include <memory>

#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif

#include "OpenclPlatform.h"

Expand Down
5 changes: 5 additions & 0 deletions OpenclError.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@

#include <string>
#include <stdexcept>

#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif

namespace cryo {
namespace gpuPlotGenerator {
Expand Down
5 changes: 5 additions & 0 deletions OpenclPlatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
#include <vector>
#include <exception>
#include <memory>

#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif

namespace cryo {
namespace gpuPlotGenerator {
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ Run the following commands :

The [dist] folder contains all the necessary files to launch the GPU plotter.

### OS X

Modify the [PLATFORM] variable to [64].
Modify the [OPENCL_INCLUDE] and [OPENCL_LIB] variables of the Makefile to the correct path.
Example:

OPENCL_INCLUDE = /System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include
OPENCL_LIB = /System/Library/Frameworks/OpenCL.framework

Run the following commands :

cd <this directory>
make dist

The [dist] folder contains all the necessary files to launch the GPU plotter.

## Setup

The GPU plot generator needs a configured [devices.txt] file in order to work properly. The devices listed
Expand Down
2 changes: 2 additions & 0 deletions constants.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef CRYO_GPU_PLOT_GENERATOR_CONSTANTS_H
#define CRYO_GPU_PLOT_GENERATOR_CONSTANTS_H

#include <string>

namespace cryo {
namespace gpuPlotGenerator {

Expand Down