Can Aparapi handle string processing with Java 8? -


i'm learning use aparapi java 8 gpu can used speed apps, wonder if aparapi can handle string processing.

for instance, if have 10,000 files go through , app needs read in text , go through each line extract , parse float numbers , computation , store result in place hashmap or list or array, cpu running @ near 100% when use multiple threads, , runs hour job done.

can app benefit aparapi java 8 allocate computing gpu ? know can [ + - * / ], can aparapi things :

string lines[]=text.split("\n"); (int i=0;i<lines.length;i++) {   float number=float.parsefloat(lines[i]);   number*=2000; } 

aparapi based on opencl can't because can't deal directly objects on heap. best move string state gpu marshalling objects single area of contiguous heap (ala rootbeer), perform parallel operation on strings. of time hard 'win back' marshall+transfer time.

the hsa enabled lambda branch of aparapi (still being worked on!) enable on hsa enabled platform. hsa allows access java heap objects directly gpu (shared virtual memory). means no longer have copy data , gpu. gpu can follow object references directly.

still can't allocate on gpu (this requires support gc, safepoints , deopt handling) beyond aparapi. sumatra, on the other hand, openjdk project , able handle use case suggest , allow allocations. has advantage of being able hook jvm ;)


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -