提交 7d48ea8a authored 作者: Ian Goodfellow's avatar Ian Goodfellow

pep8

上级 07ec3ea1
...@@ -821,15 +821,18 @@ class GpuCAReduce(GpuOp): ...@@ -821,15 +821,18 @@ class GpuCAReduce(GpuOp):
def _k_init(self, *args): def _k_init(self, *args):
return """ return """
const int threadCount = blockDim.x * blockDim.y * blockDim.z; const int threadCount = blockDim.x * blockDim.y * blockDim.z;
const int threadNum = threadIdx.z * blockDim.x * blockDim.y + threadIdx.y * blockDim.x + threadIdx.x; const int threadNum = threadIdx.z * blockDim.x * blockDim.y
+ threadIdx.y * blockDim.x + threadIdx.x;
extern __shared__ float buf[]; extern __shared__ float buf[];
float myresult = 0.0f; float myresult = 0.0f;
if (warpSize != 32) if (warpSize != 32)
{ {
// TODO: set error code // TODO: set error code
// 2012-09-17 IG: as of today, Fred says this is unlikely to change for any GPU released // 2012-09-17 IG: as of today, Fred says this is unlikely
// anytime soon. Hard to fix as _k_init is called by c_support_code_apply and // to change for any GPU released
// anytime soon. Hard to fix as _k_init is called by
// c_support_code_apply and
// c_support_code_apply is not passed a 'fail' code string. // c_support_code_apply is not passed a 'fail' code string.
Z[0] = -666; Z[0] = -666;
return; return;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论