griddedInterpolant not a built-In Functions on a GPU
8 ビュー (過去 30 日間)
古いコメントを表示
To make my code faster I have implemented "griddedInterpolant " instead of "interp1". Now I have a GPU but "griddedInterpolant" does not support gpu arrays, whereas "interp1" does. If this is the case I have to rewrite my code, using interp1. Is there a solution?
0 件のコメント
採用された回答
Joss Knight
2018 年 1 月 18 日
I'm not sure what you're asking, but if you're asking "am I right that I have to rewrite my code?" then yes, you are right.
2 件のコメント
Joss Knight
2018 年 1 月 20 日
GPU interp is a custom implementation and is not based on griddedInterpolant. Of course you can write your own implementation. If you write it in MATLAB code it's unlikely to be faster than just calling interp, in spite of the time saved computing the interpolation weights (which is why we have griddedInterpolant).
Spline interpolation is being supported in a future MATLAB, although I'm not sure if extrapolation will be. You can find another way to do extrapolation, perhaps by padding your input.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で GPU Computing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!