Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed fatal error: 'cl.h' file not found on MacOSX #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 4 additions & 0 deletions cl/cl.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ in the Go standard packages.
*/
package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
// #cgo darwin LDFLAGS: -framework OpenCL
import "C"
import "errors"
Expand Down
4 changes: 4 additions & 0 deletions cl/context.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package cl

// #include <stdlib.h>
// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"

import (
Expand Down
4 changes: 4 additions & 0 deletions cl/device.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"

import (
Expand Down
4 changes: 4 additions & 0 deletions cl/device12.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"
import "unsafe"

Expand Down
4 changes: 4 additions & 0 deletions cl/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"
import (
"image"
Expand Down
4 changes: 4 additions & 0 deletions cl/kernel.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"

import (
Expand Down
6 changes: 5 additions & 1 deletion cl/kernel12.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

package cl

// #import "cl.h"
// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"
import "unsafe"

Expand Down
4 changes: 4 additions & 0 deletions cl/platform.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"

import (
Expand Down
4 changes: 4 additions & 0 deletions cl/program.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package cl

// #include <stdlib.h>
// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"

import (
Expand Down
4 changes: 4 additions & 0 deletions cl/queue.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"

import (
Expand Down
4 changes: 4 additions & 0 deletions cl/queue12.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"
import

Expand Down
4 changes: 4 additions & 0 deletions cl/types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"

import (
Expand Down
4 changes: 4 additions & 0 deletions cl/types12.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"

const (
Expand Down
4 changes: 4 additions & 0 deletions cl/types_darwin.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package cl

// #ifdef __APPLE__
// #include "OpenCL/opencl.h"
// #else
// #include "cl.h"
// #endif
import "C"

// Extension: cl_APPLE_fixed_alpha_channel_orders
Expand Down