out_clp2_size => out_block_size
clp2_count => reduce_block_size
@@ -151,7 +151,7 @@ cpdef tuple _get_trans_args(list args, tuple trans, tuple shape, tuple params):
cpdef list _get_inout_args(
list in_args, list out_args, Indexer in_indexer, Indexer out_indexer,
- Py_ssize_t out_clp2_size, tuple params, bint reduce_dims):
+ Py_ssize_t out_block_size, tuple params, bint reduce_dims):
if reduce_dims:
in_shape = _reduce_dims(in_args, params, in_indexer.shape)
out_shape = _reduce_dims(
@@ -159,7 +159,7 @@ cpdef list _get_inout_args(
in_indexer.shape = in_shape
out_indexer.shape = out_shape
cdef _scalar.CScalar s = _scalar.CScalar.__new__(_scalar.CScalar)
- (<int32_t *>s.ptr)[0] = out_clp2_size
+ (<int32_t *>s.ptr)[0] = out_block_size
s.kind = 'i'
s.size = 4
return in_args + out_args + [in_indexer, out_indexer, s]
@@ -209,7 +209,7 @@ class simple_reduction_function(object):
bint keepdims=False):
cdef list in_args, out_args
cdef tuple in_sahpe, laxis, raxis
- cdef Py_ssize_t block_size, clp2_count, block_stride
+ cdef Py_ssize_t block_size, reduce_block_size, out_block_size
if dtype is not None:
dtype = get_dtype(dtype).type
@@ -242,8 +242,8 @@ class simple_reduction_function(object):
block_size = self._block_size
in_indexer = Indexer(in_shape)
out_indexer = Indexer(out_shape)
- clp2_count = max(1, internal.clp2(in_indexer.size // out_indexer.size))
- block_stride = max(1, block_size // clp2_count)
+ reduce_block_size = max(1, internal.clp2(in_indexer.size // out_indexer.size))
+ out_block_size = max(1, block_size // reduce_block_size)
inout_args = _get_inout_args(
in_args, out_args, in_indexer, out_indexer, block_stride,
@@ -371,7 +371,7 @@ class ReductionKernel(object):
``__init__`` method.
"""
- cdef Py_ssize_t block_size, clp2_count, block_stride
+ cdef Py_ssize_t block_size, reduce_block_size, out_block_size
out = kwargs.pop('out', None)
axis = kwargs.pop('axis', None)
@@ -428,8 +428,8 @@ class ReductionKernel(object):
block_size = 512
in_indexer = Indexer(in_shape)
out_indexer = Indexer(out_shape)
- clp2_count = max(1, internal.clp2(in_indexer.size // out_indexer.size))
- block_stride = max(1, block_size // clp2_count)
+ reduce_block_size = max(1, internal.clp2(in_indexer.size // out_indexer.size))
+ out_block_size = max(1, block_size // reduce_block_size)
inout_args = _get_inout_args(
in_args, out_args, in_indexer, out_indexer, block_stride,
