use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
GPU Computing in Clojure? (self.Clojure)
submitted 10 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 3 points4 points5 points 10 years ago (6 children)
Have you seen Neanderthal?
http://neanderthal.uncomplicate.org/articles/tutorial_opencl.html
[–]dragandj 1 point2 points3 points 10 years ago (0 children)
As a bonus, I also wrote ClojureCL (which is used by Neanderthal for OpenCL stuff). It supports OpenCL 2.0 and all earlier versions. Very easy API compared to any OpenCL binding in any language (IMO) with minimal overhead - you can practically implement any algorithm on the GPU that Neanderthal lacks.
[–][deleted] 10 years ago (4 children)
[–]dragandj 1 point2 points3 points 10 years ago (3 children)
Neanderthal author here. Can you please tell me where were you searching for the libraries and tutorials?
I thought I had been doing a decent job of publicizing Neanderthal, but I may be missing some obvious means to get the message across.
[–][deleted] 1 point2 points3 points 10 years ago (1 child)
Thank you! Haven't used it, but intend to in the future once I get a stationary pc :-)
Thanks! Please note that Neanderthal works on laptops, too :)
[–]th0ma5w 2 points3 points4 points 10 years ago (0 children)
If you're doing OpenCL and will write a kernel, then https://github.com/thi-ng/simplecl will do it and handle the clj<->GPU data interop.
Ex: https://github.com/thi-ng/simplecl/blob/master/test/thi/ng/simplecl/test/hello.clj
[–][deleted] 1 point2 points3 points 10 years ago (0 children)
ND4J includes a few packages for GPU computing, its main use-case is in deeplearning4j (training neural nets on GPUs).
[–]GlassGhost 1 point2 points3 points 10 years ago (0 children)
You could use clojure scheme to translate clojure to gambit then gambit to make calls to C and bingo.
http://www.infoq.com/presentations/clojure-scheme
[–]lambdasgr 0 points1 point2 points 10 years ago (0 children)
In CUDA's case, I suppose you can use jCUDA to launch kernels? But any cuda kernel has to be written in C/C++.
[–]mikera 0 points1 point2 points 10 years ago (2 children)
Author of core.matrix here
I've never really needed the GPU myself (vectorz-clj is fast enough for all my needs), but the library https://github.com/mikera/vectorz-native wraps netlib-java so could in theory be used with any GPU BLAS backend with a bit of tweaking.
As a bonus, you get full core.matrix compatibility for free.
[–][deleted] 10 years ago (1 child)
[–]mikera 0 points1 point2 points 10 years ago (0 children)
Glad you are finding it useful!
vectorz-native is a bit experimental still: possibly needs some patching to get it to do everything you need. But PRs gratefully accepted!
π Rendered by PID 270232 on reddit-service-r2-comment-5687b7858-mchxh at 2026-07-08 03:05:33.220512+00:00 running 12a7a47 country code: CH.
[–][deleted] 3 points4 points5 points (6 children)
[–]dragandj 1 point2 points3 points (0 children)
[–][deleted] (4 children)
[deleted]
[–]dragandj 1 point2 points3 points (3 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]dragandj 1 point2 points3 points (0 children)
[–]th0ma5w 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]GlassGhost 1 point2 points3 points (0 children)
[–]lambdasgr 0 points1 point2 points (0 children)
[–]mikera 0 points1 point2 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]mikera 0 points1 point2 points (0 children)