相关疑难解决方法(0)

GPU上的整数计算

对于我的工作来说,进行整数计算特别有趣,这显然不是GPU的用途.我的问题是:现代GPU是否支持高效的整数运算?我意识到这应该很容易为自己弄清楚,但我发现相互矛盾的答案(例如),所以我认为最好问.

另外,GPU上有任意精度整数的库/技术吗?

optimization performance integer gpgpu

18
推荐指数
1
解决办法
8830
查看次数

Android - OpenGL FloatBuffer与IntBuffer

在大多数Android设备上,如果我用Integers而不是Floats进行所有OpenGL顶点计算/渲染,我是否应该期望性能提升?

我最近从使用0:宽度,0:高度而不是-1:1,-1:1的OpenGL视口切换,所以如果需要,我可以将所有绘图计算/缓冲区转换为Ints而不是Floats为了表现.

例如,如果我在我的应用程序中执行以下许多类型的计算和渲染.

float x1 = someFloatCalculation(foo);
float x2 = someFloatCalculation(bar);
float y1 = someOtherFloatCalculation(foo);
float y2 = someOtherFloatCalculation(bar);
// the float buffer for the coordinates
FloatBuffer buf = makeFloatBuffer(new float[] { x1, y1, x2, y1, x1,
                                                y2, x2, y2 });
gl.glVertexPointer(2, GL10.GL_FLOAT, 0, buf);
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);
Run Code Online (Sandbox Code Playgroud)

可以通过改变类似的东西来加快速度

int x1 = someIntCalculation(foo);
int x2 = someIntCalculation(bar);
int y1 = someOtherIntCalculation(foo);
int y2 = someOtherIntCalculation(bar);
// the float buffer for the coordinates
IntBuffer buf = makeIntBuffer(new int[] { x1, y1, …
Run Code Online (Sandbox Code Playgroud)

performance android opengl-es

3
推荐指数
1
解决办法
1213
查看次数

标签 统计

performance ×2

android ×1

gpgpu ×1

integer ×1

opengl-es ×1

optimization ×1