go-gl / cl Goto Github PK
View Code? Open in Web Editor NEWOpenCL bindings for Go
License: MIT License
OpenCL bindings for Go
License: MIT License
Any calls to functions which calls cgo with a double pointer, (for example CreateProgramWithSource) will cause a runtime error:
panic: runtime error: cgo argument has Go pointer to Go pointer
In Go 1.6 as a result of the changes to cgo: https://tip.golang.org/doc/go1.6#cgo
I noticed you guys are already aware of this for OpenGL bindings: go-gl/gl#31
Hi,
I see this package has a lot of comments without a space after the two forward slashes, e.g.:
//Create Command Queue
Idiomatic Go style for comments is to include a space after the two forward slashes, so it should be:
// Create Command Queue
See https://golang.org/doc/effective_go.html#commentary and https://github.com/golang/go/wiki/CodeReviewComments#comment-sentences.
No space is used for commented out code and non-compiler directives, for example:
//go:generate foo
Go1.8
I can get the dreaded 'panic: runtime error: cgo argument has Go pointer to Go pointer' in
cl.GetPlatformIDs() when i make the cl.PlatformID argument a non-local variable. Same for cl.DeviceId in cl.GetDeviceIDs()...
Things seem to work fine if those variables are local, like in the provided sample code. It is a mystery to me, because this panic comes and goes, depending on code changes i make, and thus maybe the
actual addresses where the cl.PlatformID and cl.DeviceId are stored?
With the new OpenCL cl.h file there is a change where an anonymous enum is giving troubles:
../../../../go/extern/src/github.com/go-gl/cl/v1.2/cl/package.go:726: unknown field 'buffer' in struct literal of type C.struct__cl_image_desc
I don't know how to properly solve this other than (temporarily) using the v1.2 cl.h header. Maybe there is a way to let cgo handle that enum?
When building, /usr/bin/ld: cannot find -lCL
.
$ locate libCL # No results
$ locate libOpenCL
/opt/intel/opencl/libOpenCL.so
/opt/intel/opencl/libOpenCL.so.1
/opt/intel/opencl-runtime/lib64/libOpenCL.so
/opt/intel/opencl-runtime/lib64/libOpenCL.so.1
/opt/intel/opencl-runtime/lib64/libOpenCL.so.2.0
/usr/lib/libOpenCL.so
/usr/lib/libOpenCL.so.1
/usr/lib/libOpenCL.so.1.0.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.