1

我正在尝试在 java 中使用我的 GPU,我正在使用 Aparapi,但我有一个问题,如果我使用 (float)Math.sin(x) 它仍然会退回到 CPU,因为我的 GPU 不支持 F64。有浮点数的数学库吗?我应该使用 gpu 来计算罪孽吗?

4

1 回答 1

1

I would expect a project like this to come with math routines of its own so that you can call functions implemented on the GPU.

And it does: Kernel.sin(float) in Aparapi should map to a call to the OpenCL sin function.

Whether it makes sense to do trig on the GPU, that's for you to evaluate.

于 2020-04-05T23:21:37.887 回答