Rank: 2067 based on 35 downloads (last 30 days) and 2 files submitted
photo

Jun Tan

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Jun View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
28 Jan 2013 Screenshot 3D trilinear interpolation using GPU 3D trilinear interpolation using GPU. 20 times faster. Author: Jun Tan 3d trilinear interpol..., interpolation, interp3, trilinear 30 2
28 Jan 2013 poly2mask using GPU poly2mask using GPU. Author: Jun Tan poly2mask, gpu, polygon to mask 5 0
Comments and Ratings by Jun
Updated File Comments Rating
22 Feb 2013 3D trilinear interpolation using GPU 3D trilinear interpolation using GPU. 20 times faster. Author: Jun Tan

Hi, Raphael:

Thanks for your comments.

My program uses a persistent variable "k_interp3" (the kernel) in file "interp3_gpu.m". This variable is created the first time it is used, and remains in memory until you clear the variable manually or you close your Matlab.

The reason that I use the persistent variable is that the kernel only needs to be created once in order to save the time spent in creating it. Matlab is actually slow in creating it. So I don't want to create it every time I need to call interp3_gpu.m.

Moreover, if you clear the variable, my program can recreate k_interp3 again when it notices that the variable doesn't exist. I believe the minor memory cost is not a problem, so I leave it up to the users to clear it when needed.

My test shows that when I run command "clear all" and "gpuDevice", the "FreeMemory" value returns to its original value.

I hope I have answered your question.

Good luck,
Jun

Comments and Ratings on Jun's Files View all
Updated File Comment by Comments Rating
22 Feb 2013 3D trilinear interpolation using GPU 3D trilinear interpolation using GPU. 20 times faster. Author: Jun Tan Tan, Jun

Hi, Raphael:

Thanks for your comments.

My program uses a persistent variable "k_interp3" (the kernel) in file "interp3_gpu.m". This variable is created the first time it is used, and remains in memory until you clear the variable manually or you close your Matlab.

The reason that I use the persistent variable is that the kernel only needs to be created once in order to save the time spent in creating it. Matlab is actually slow in creating it. So I don't want to create it every time I need to call interp3_gpu.m.

Moreover, if you clear the variable, my program can recreate k_interp3 again when it notices that the variable doesn't exist. I believe the minor memory cost is not a problem, so I leave it up to the users to clear it when needed.

My test shows that when I run command "clear all" and "gpuDevice", the "FreeMemory" value returns to its original value.

I hope I have answered your question.

Good luck,
Jun

22 Feb 2013 3D trilinear interpolation using GPU 3D trilinear interpolation using GPU. 20 times faster. Author: Jun Tan Raphael

Hello!
In my opinion you have some trouble with memory usage in your code.
If I check the gpu-Memory with gpu.FreeMemory before and after your program running with bigger matrices there is some memory blocked.

Up to now i could not find out how to solve the problem. I suppose there is a problem with the use of feval.
If i use the feval function with an empty kernel i have the same problem...
Greeting, Raphael

Top Tags Applied by Jun
3d trilinear interpolation, gpu, interp3, interpolation, poly2mask
Files Tagged by Jun View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
28 Jan 2013 Screenshot 3D trilinear interpolation using GPU 3D trilinear interpolation using GPU. 20 times faster. Author: Jun Tan 3d trilinear interpol..., interpolation, interp3, trilinear 30 2
28 Jan 2013 poly2mask using GPU poly2mask using GPU. Author: Jun Tan poly2mask, gpu, polygon to mask 5 0

Contact us