I have a Matlab program that reads in large amount of data from physical file on disk and perform intensive computation like this:
data = load('myfile.dat');
results = intensiveCompute(data);
The computation is done on GPU and takes a very long time. What I'd like to do is to be able to load in data from the next file while the computation is running (since loading file is also a bottleneck). From what I gather so far, this is doable using Mex (e.g. _beginthread etc...). However, if possible it would be ideal to stay within the Matlab environment. Perhaps there's some way to spawn a thread in Matlab to read data and another to perform computation. Any help is greatly appreciated.