3D Linear Interpolation for GPU

버전 1.2.0.0 (1.43 KB) 작성자: Philip
3D Linear Interpolation for GPU
다운로드 수: 391
업데이트 날짜: 2014/8/5

라이선스 보기

This function is faster than MATLAB's griddedInterpolant function for the CPU, but slower than MATLAB's interpn function for the GPU. However, I've coded this using arrayfun. Since MATLAB does not support using interpn in arrayfun, this function should be helpful to those who wish to do interpolation inside more complex code executing on the GPU using arrayfun. I tried making this code as fast as possible, but I cannot match the speed of interpn. Any suggestions for improvements would be greatly appreciated.
Note that this function assumes the data to be interpolated does not go off the grid and the grid is uniformly spaced in each dimension. The syntax is exactly like interpn, i.e.
Vi=interpn(x1,x2,x3,V,x1i,x2i,x3i);
Vi=interp3gpu(x1,x2,x3,V,x1i,x2i,x3i);
should produce the same result. If your data are gpuArrays, then interp3gpu will execute on your GPU. Otherwise it will execute on your CPU.

인용 양식

Philip (2024). 3D Linear Interpolation for GPU (https://www.mathworks.com/matlabcentral/fileexchange/47437-3d-linear-interpolation-for-gpu), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

Updated description.

1.1.0.0

Updated code to make it faster and use less memory.

1.0.0.0