Closed GoogleCodeExporter closed 8 years ago
http://code.google.com/p/aparapi/wiki/UsingLocalMemory
Original comment by ryan.lam...@gmail.com
on 27 Jan 2013 at 3:26
JOCL is a great library. I wrote my first GPU enable library using JOCL.
If you are writing your own OpenCL you might also consider the mechanism we
added to Aparapi to support this. It allows you to map OpenCL source to a Java
API so you can just execute directly. Please take a look.
http://code.google.com/p/aparapi/wiki/NewOpenCLBinding
Now you have experience with Aparapi and JOCL I would be interested in your
feedback on the approach we added to Aparapi.
Gary
Original comment by frost.g...@gmail.com
on 27 Jan 2013 at 6:54
I was just doing experimets with JOCL for a multi-device wrapper approach
inspired by APARAPI then I just saw the "squarer" example and put a facepalm
myself. "in" and "out" arrays annotations are great. Just like I wanted to do
for my experimental applet. Great flexibility. Thanks. Saves a ton of work. I
added a kernel transformer that gets float 's then converts to float8 if device
is a CPU and converts to float4 if it is an old GPU.
Original comment by huseyin....@gmail.com
on 1 Jun 2013 at 8:22
Any example code you can contribute to Aparapi would be great
Original comment by pnnl.edg...@gmail.com
on 1 Jun 2013 at 8:24
Device.firstCPU.firstSevenCores(Squarer.class) would make APARAPI go from
99.9999999% %100 perfect :) APARAPI should be a standard for Java just like
System.out.print.
Original comment by huseyin....@gmail.com
on 1 Jun 2013 at 8:33
@pnnl: code is just a simple sub-string replacer which is for a pure-vector
kernel. I mean there is no using of vector elements like vector.s0 vetor.w .
Just pure vector calculations such as dx=x0-x1. Takes float a=0; ten makes it
float8 a=(float8)(0,...,0). Nothing more because i dont what to do for other
things :(
Original comment by huseyin....@gmail.com
on 1 Jun 2013 at 8:47
So the intent of
Device.firstCPU.firstSevenCores(Squarer.class)
Syntax would limit execution to 7 cores.
Alas, this is tricky. We rely on OpenCL (CPU mode) and Java for thread
dispatching on the CPU and neither exposes that granularity. The only way I
know to restrict access to a subset of cores is by restricting the whole JVM at
startup via OS specific options.
I very glad you tried (and found value) using the annotated interface solution
I added, I think very few people have tried this (my guess it may be just you
and I ;) ) . It is certainly how I would have liked to have coded using JOCL.
Gary
Original comment by frost.g...@gmail.com
on 4 Jun 2013 at 4:18
In the mean time, new graphics cards will have serial-computing parts mean
that we no need parallellizm more?
Original comment by huseyin....@gmail.com
on 4 Jun 2013 at 10:05
Original issue reported on code.google.com by
huseyin....@gmail.com
on 25 Jan 2013 at 5:22Attachments: