Skip to content

Commit

Permalink
VENDOR_INTEL -> DEVICE_VENDOR_INTEL
Browse files Browse the repository at this point in the history
  • Loading branch information
brichard19 committed Feb 8, 2019
1 parent a32ba51 commit 18bdfb1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clUtil/clContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ cl::CLProgram::CLProgram(cl::CLContext &ctx, std::string srcFile, std::string op
size_t len = src.length();
cl_int err;

if(util::toLower(_ctx.getDeviceVendor()) == "intel") {
options += "-DVENDOR_INTEL";
if(util::toLower(_ctx.getDeviceVendor()).find("intel") != std::string::npos) {
options += "-DDEVICE_VENDOR_INTEL";
}

_prog = clCreateProgramWithSource(ctx.getContext(), 1, &ptr, &len, &err);
Expand Down Expand Up @@ -117,8 +117,8 @@ cl::CLProgram::CLProgram(cl::CLContext &ctx, const char *src, std::string option
size_t len = strlen(src);
cl_int err;

if(util::toLower(_ctx.getDeviceVendor()) == "intel") {
options += "-DVENDOR_INTEL";
if(util::toLower(_ctx.getDeviceVendor()).find("intel") != std::string::npos) {
options += "-DDEVICE_VENDOR_INTEL";
}

_prog = clCreateProgramWithSource(ctx.getContext(), 1, &src, &len, &err);
Expand Down
6 changes: 6 additions & 0 deletions clUtil/clutil.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#ifndef _CL_UTIL_H
#define _CL_UTIL_H

#ifdef __APPLE__
#define CL_SILENCE_DEPRECATION
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif

#include <string>
#include <vector>

Expand Down

0 comments on commit 18bdfb1

Please sign in to comment.