mtchamengo / aparapi

Automatically exported from code.google.com/p/aparapi
Other
0 stars 0 forks source link

Aparapi and Jmonkey for planetary collision #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Aparapi is perfect. I wish there were local memory usage.
Calculation speed of n-body with Aparapi against using Jocl is less than %10.

Good days.

Original issue reported on code.google.com by huseyin....@gmail.com on 25 Jan 2013 at 5:22

Attachments:

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/aparapi/wiki/UsingLocalMemory

Original comment by ryan.lam...@gmail.com on 27 Jan 2013 at 3:26

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
@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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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