diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-10-16 21:25:33 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-10-16 21:25:33 +0800 |
commit | d5327ddc5fdc2a8b967699ea06ef5b5503657123 (patch) | |
tree | 9872db19a62cb21fc68e7c3e27a8bf8b9fcc63bd /Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go | |
parent | b74775400906cc582bdbb98bf5067c5258ee491f (diff) | |
parent | ec6a548ee3555813d83f86f82bd25694bfd9c303 (diff) | |
download | go-tangerine-d5327ddc5fdc2a8b967699ea06ef5b5503657123.tar go-tangerine-d5327ddc5fdc2a8b967699ea06ef5b5503657123.tar.gz go-tangerine-d5327ddc5fdc2a8b967699ea06ef5b5503657123.tar.bz2 go-tangerine-d5327ddc5fdc2a8b967699ea06ef5b5503657123.tar.lz go-tangerine-d5327ddc5fdc2a8b967699ea06ef5b5503657123.tar.xz go-tangerine-d5327ddc5fdc2a8b967699ea06ef5b5503657123.tar.zst go-tangerine-d5327ddc5fdc2a8b967699ea06ef5b5503657123.zip |
Merge pull request #1869 from Gustav-Simonsson/gpu_miner
all: Add GPU mining, disabled by default
Diffstat (limited to 'Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go new file mode 100644 index 000000000..3d577b2b6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go @@ -0,0 +1,26 @@ +/* +Package cl provides a binding to the OpenCL api. It's mostly a low-level +wrapper that avoids adding functionality while still making the interface +a little more friendly and easy to use. + +Resource life-cycle management: + +For any CL object that gets created (buffer, queue, kernel, etc..) you should +call object.Release() when finished with it to free the CL resources. This +explicitely calls the related clXXXRelease method for the type. However, +as a fallback there is a finalizer set for every resource item that takes +care of it (eventually) if Release isn't called. In this way you can have +better control over the life cycle of resources while having a fall back +to avoid leaks. This is similar to how file handles and such are handled +in the Go standard packages. +*/ +package cl + +// #include "headers/1.2/opencl.h" +// #cgo CFLAGS: -Iheaders/1.2 +// #cgo darwin LDFLAGS: -framework OpenCL +// #cgo linux LDFLAGS: -lOpenCL +import "C" +import "errors" + +var ErrUnsupported = errors.New("cl: unsupported") |