My Java app reads in thousands of text files, goes through the lines and parse the text into floats and does some calculation with them then saves the results into some files, now I'm using multiple thread to execute them simultaneously, still need about an hour to run the whole app.
Here is a simplified pseudo version of what my app does :
String Lines[]=ReadFile("abc.txt"),Items[];
float its[];
for (int i=0;i<Lines.length;i++)
{
Items=Lines[i].split(",");
its=new float[Items.length];
for (int j=0;j<its.length;j++) its[j]=Float.parseFloat(Items[j]);
do some calculation with : its[]
}
Do more calculation, save results to a StringBuffer.
Save StringBuffer to ("abc_result.txt");
I've read that Rootbeer is able to shift some workload to GPU and speed up the process, so my questions are :
[1] Can Rootbeer handle text parsing and file I/O on the GPU ? Or do I need this portion done on CPU and only do the calculation on GPU ?
[2] Would my app benefit from Rootbeer ?