Skip to content

Commit ba0699c

Browse files
Remove redundant dpctl::tensor::py_internal qualifiers
1 parent e7d45ab commit ba0699c

File tree

8 files changed

+66
-74
lines changed

8 files changed

+66
-74
lines changed

dpctl_ext/tensor/libtensor/source/accumulators.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ std::size_t py_mask_positions(const dpctl::tensor::usm_ndarray &mask,
196196
int mask_nd = mask.get_ndim();
197197
int nd = mask_nd;
198198

199-
dpctl::tensor::py_internal::compact_iteration_space(
200-
nd, shape, strides_vector, compact_shape, compact_strides);
199+
compact_iteration_space(nd, shape, strides_vector, compact_shape,
200+
compact_strides);
201201

202202
// Strided implementation
203203
auto strided_fn =
@@ -351,8 +351,8 @@ std::size_t py_cumsum_1d(const dpctl::tensor::usm_ndarray &src,
351351
int src_nd = src.get_ndim();
352352
int nd = src_nd;
353353

354-
dpctl::tensor::py_internal::compact_iteration_space(
355-
nd, shape, strides_vector, compact_shape, compact_strides);
354+
compact_iteration_space(nd, shape, strides_vector, compact_shape,
355+
compact_strides);
356356

357357
// Strided implementation
358358
auto strided_fn = cumsum_1d_strided_dispatch_vector[src_typeid];

dpctl_ext/tensor/libtensor/source/boolean_advanced_indexing.cpp

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -336,21 +336,19 @@ std::pair<sycl::event, sycl::event>
336336
shT masked_src_shape;
337337
shT ortho_src_strides;
338338
shT masked_src_strides;
339-
dpctl::tensor::py_internal::split_iteration_space(
340-
src_shape_vec, src_strides_vec, axis_start, axis_end,
341-
ortho_src_shape,
342-
masked_src_shape, // 4 vectors modified
343-
ortho_src_strides, masked_src_strides);
339+
split_iteration_space(src_shape_vec, src_strides_vec, axis_start,
340+
axis_end, ortho_src_shape,
341+
masked_src_shape, // 4 vectors modified
342+
ortho_src_strides, masked_src_strides);
344343

345344
shT ortho_dst_shape;
346345
shT masked_dst_shape;
347346
shT ortho_dst_strides;
348347
shT masked_dst_strides;
349-
dpctl::tensor::py_internal::split_iteration_space(
350-
dst_shape_vec, dst_strides_vec, axis_start, axis_start + 1,
351-
ortho_dst_shape,
352-
masked_dst_shape, // 4 vectors modified
353-
ortho_dst_strides, masked_dst_strides);
348+
split_iteration_space(dst_shape_vec, dst_strides_vec, axis_start,
349+
axis_start + 1, ortho_dst_shape,
350+
masked_dst_shape, // 4 vectors modified
351+
ortho_dst_strides, masked_dst_strides);
354352

355353
assert(ortho_src_shape.size() == static_cast<std::size_t>(ortho_nd));
356354
assert(ortho_dst_shape.size() == static_cast<std::size_t>(ortho_nd));
@@ -366,7 +364,7 @@ std::pair<sycl::event, sycl::event>
366364
py::ssize_t ortho_src_offset(0);
367365
py::ssize_t ortho_dst_offset(0);
368366

369-
dpctl::tensor::py_internal::simplify_iteration_space(
367+
simplify_iteration_space(
370368
ortho_nd, _shape, ortho_src_strides, ortho_dst_strides,
371369
// output
372370
simplified_ortho_shape, simplified_ortho_src_strides,
@@ -646,21 +644,19 @@ std::pair<sycl::event, sycl::event>
646644
shT masked_dst_shape;
647645
shT ortho_dst_strides;
648646
shT masked_dst_strides;
649-
dpctl::tensor::py_internal::split_iteration_space(
650-
dst_shape_vec, dst_strides_vec, axis_start, axis_end,
651-
ortho_dst_shape,
652-
masked_dst_shape, // 4 vectors modified
653-
ortho_dst_strides, masked_dst_strides);
647+
split_iteration_space(dst_shape_vec, dst_strides_vec, axis_start,
648+
axis_end, ortho_dst_shape,
649+
masked_dst_shape, // 4 vectors modified
650+
ortho_dst_strides, masked_dst_strides);
654651

655652
shT ortho_rhs_shape;
656653
shT masked_rhs_shape;
657654
shT ortho_rhs_strides;
658655
shT masked_rhs_strides;
659-
dpctl::tensor::py_internal::split_iteration_space(
660-
rhs_shape_vec, rhs_strides_vec, axis_start, axis_start + 1,
661-
ortho_rhs_shape,
662-
masked_rhs_shape, // 4 vectors modified
663-
ortho_rhs_strides, masked_rhs_strides);
656+
split_iteration_space(rhs_shape_vec, rhs_strides_vec, axis_start,
657+
axis_start + 1, ortho_rhs_shape,
658+
masked_rhs_shape, // 4 vectors modified
659+
ortho_rhs_strides, masked_rhs_strides);
664660

665661
assert(ortho_dst_shape.size() == static_cast<std::size_t>(ortho_nd));
666662
assert(ortho_rhs_shape.size() == static_cast<std::size_t>(ortho_nd));
@@ -676,7 +672,7 @@ std::pair<sycl::event, sycl::event>
676672
py::ssize_t ortho_dst_offset(0);
677673
py::ssize_t ortho_rhs_offset(0);
678674

679-
dpctl::tensor::py_internal::simplify_iteration_space(
675+
simplify_iteration_space(
680676
ortho_nd, _shape, ortho_dst_strides, ortho_rhs_strides,
681677
simplified_ortho_shape, simplified_ortho_dst_strides,
682678
simplified_ortho_rhs_strides, ortho_dst_offset, ortho_rhs_offset);

dpctl_ext/tensor/libtensor/source/clip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ std::pair<sycl::event, sycl::event>
218218
py::ssize_t max_offset(0);
219219
py::ssize_t dst_offset(0);
220220

221-
dpctl::tensor::py_internal::simplify_iteration_space_4(
221+
simplify_iteration_space_4(
222222
nd, src_shape, src_strides, min_strides, max_strides, dst_strides,
223223
// outputs
224224
simplified_shape, simplified_src_strides, simplified_min_strides,

dpctl_ext/tensor/libtensor/source/copy_and_cast_usm_to_usm.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,10 @@ std::pair<sycl::event, sycl::event> copy_usm_ndarray_into_usm_ndarray(
188188
const py::ssize_t *shape = src_shape;
189189

190190
// nd, simplified_* and *_offset are modified by reference
191-
dpctl::tensor::py_internal::simplify_iteration_space(
192-
nd, shape, src_strides, dst_strides,
193-
// output
194-
simplified_shape, simplified_src_strides, simplified_dst_strides,
195-
src_offset, dst_offset);
191+
simplify_iteration_space(nd, shape, src_strides, dst_strides,
192+
// output
193+
simplified_shape, simplified_src_strides,
194+
simplified_dst_strides, src_offset, dst_offset);
196195

197196
if (nd < 2) {
198197
if (nd == 1) {

dpctl_ext/tensor/libtensor/source/copy_as_contig.cpp

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ std::pair<sycl::event, sycl::event>
225225
int nd = src_nd;
226226

227227
// nd, simplified_* and *_offset are modified by reference
228-
dpctl::tensor::py_internal::simplify_iteration_space(
229-
nd, src_shape_vec.data(), src_strides_vec, dst.get_strides_vector(),
230-
// output
231-
simplified_shape, simplified_src_strides, simplified_dst_strides,
232-
src_offset, dst_offset);
228+
simplify_iteration_space(nd, src_shape_vec.data(), src_strides_vec,
229+
dst.get_strides_vector(),
230+
// output
231+
simplified_shape, simplified_src_strides,
232+
simplified_dst_strides, src_offset, dst_offset);
233233

234234
if (!((0 == src_offset) && (0 == dst_offset))) {
235235
throw std::runtime_error(
@@ -359,11 +359,11 @@ std::pair<sycl::event, sycl::event>
359359
int nd = src_nd;
360360

361361
// nd, simplified_* and *_offset are modified by reference
362-
dpctl::tensor::py_internal::simplify_iteration_space(
363-
nd, src_shape_vec.data(), src_strides_vec, dst.get_strides_vector(),
364-
// output
365-
simplified_shape, simplified_src_strides, simplified_dst_strides,
366-
src_offset, dst_offset);
362+
simplify_iteration_space(nd, src_shape_vec.data(), src_strides_vec,
363+
dst.get_strides_vector(),
364+
// output
365+
simplified_shape, simplified_src_strides,
366+
simplified_dst_strides, src_offset, dst_offset);
367367

368368
if (!((0 == src_offset) && (0 == dst_offset))) {
369369
throw std::runtime_error(
@@ -521,12 +521,11 @@ std::pair<sycl::event, sycl::event>
521521
int nd = static_cast<int>(batch_shape_vec.size());
522522

523523
// nd, simplified_* and *_offset are modified by reference
524-
dpctl::tensor::py_internal::simplify_iteration_space(
525-
nd, batch_shape_vec.data(), src_batch_strides_vec,
526-
dst_batch_strides_vec,
527-
// output
528-
simplified_shape, simplified_src_strides, simplified_dst_strides,
529-
src_offset, dst_offset);
524+
simplify_iteration_space(nd, batch_shape_vec.data(), src_batch_strides_vec,
525+
dst_batch_strides_vec,
526+
// output
527+
simplified_shape, simplified_src_strides,
528+
simplified_dst_strides, src_offset, dst_offset);
530529

531530
if (!((0 == src_offset) && (0 == dst_offset))) {
532531
throw std::runtime_error(
@@ -714,12 +713,11 @@ std::pair<sycl::event, sycl::event>
714713
int nd = static_cast<int>(batch_shape_vec.size());
715714

716715
// nd, simplified_* and *_offset are modified by reference
717-
dpctl::tensor::py_internal::simplify_iteration_space(
718-
nd, batch_shape_vec.data(), src_batch_strides_vec,
719-
dst_batch_strides_vec,
720-
// output
721-
simplified_shape, simplified_src_strides, simplified_dst_strides,
722-
src_offset, dst_offset);
716+
simplify_iteration_space(nd, batch_shape_vec.data(), src_batch_strides_vec,
717+
dst_batch_strides_vec,
718+
// output
719+
simplified_shape, simplified_src_strides,
720+
simplified_dst_strides, src_offset, dst_offset);
723721

724722
if (!((0 == src_offset) && (0 == dst_offset))) {
725723
throw std::runtime_error(

dpctl_ext/tensor/libtensor/source/copy_for_roll.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,10 @@ std::pair<sycl::event, sycl::event>
197197
const py::ssize_t *shape = src_shape_ptr;
198198

199199
// nd, simplified_* and *_offset are modified by reference
200-
dpctl::tensor::py_internal::simplify_iteration_space(
201-
nd, shape, src_strides, dst_strides,
202-
// output
203-
simplified_shape, simplified_src_strides, simplified_dst_strides,
204-
src_offset, dst_offset);
200+
simplify_iteration_space(nd, shape, src_strides, dst_strides,
201+
// output
202+
simplified_shape, simplified_src_strides,
203+
simplified_dst_strides, src_offset, dst_offset);
205204

206205
if (nd == 1 && simplified_src_strides[0] == 1 &&
207206
simplified_dst_strides[0] == 1) {

dpctl_ext/tensor/libtensor/source/repeat.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,17 @@ std::pair<sycl::event, sycl::event>
285285
shT orthog_src_strides;
286286
shT axis_src_shape;
287287
shT axis_src_stride;
288-
dpctl::tensor::py_internal::split_iteration_space(
289-
src_shape_vec, src_strides_vec, axis, axis + 1, orthog_src_shape,
290-
axis_src_shape, orthog_src_strides, axis_src_stride);
288+
split_iteration_space(src_shape_vec, src_strides_vec, axis, axis + 1,
289+
orthog_src_shape, axis_src_shape,
290+
orthog_src_strides, axis_src_stride);
291291

292292
shT orthog_dst_shape;
293293
shT orthog_dst_strides;
294294
shT axis_dst_shape;
295295
shT axis_dst_stride;
296-
dpctl::tensor::py_internal::split_iteration_space(
297-
dst_shape_vec, dst_strides_vec, axis, axis + 1, orthog_dst_shape,
298-
axis_dst_shape, orthog_dst_strides, axis_dst_stride);
296+
split_iteration_space(dst_shape_vec, dst_strides_vec, axis, axis + 1,
297+
orthog_dst_shape, axis_dst_shape,
298+
orthog_dst_strides, axis_dst_stride);
299299

300300
assert(orthog_src_shape.size() == static_cast<std::size_t>(orthog_nd));
301301
assert(orthog_dst_shape.size() == static_cast<std::size_t>(orthog_nd));
@@ -310,7 +310,7 @@ std::pair<sycl::event, sycl::event>
310310

311311
py::ssize_t orthog_src_offset(0);
312312
py::ssize_t orthog_dst_offset(0);
313-
dpctl::tensor::py_internal::simplify_iteration_space(
313+
simplify_iteration_space(
314314
orthog_nd, _shape, orthog_src_strides, orthog_dst_strides,
315315
// output
316316
simplified_orthog_shape, simplified_orthog_src_strides,
@@ -641,17 +641,17 @@ std::pair<sycl::event, sycl::event>
641641
shT orthog_src_strides;
642642
shT axis_src_shape;
643643
shT axis_src_stride;
644-
dpctl::tensor::py_internal::split_iteration_space(
645-
src_shape_vec, src_strides_vec, axis, axis + 1, orthog_src_shape,
646-
axis_src_shape, orthog_src_strides, axis_src_stride);
644+
split_iteration_space(src_shape_vec, src_strides_vec, axis, axis + 1,
645+
orthog_src_shape, axis_src_shape,
646+
orthog_src_strides, axis_src_stride);
647647

648648
shT orthog_dst_shape;
649649
shT orthog_dst_strides;
650650
shT axis_dst_shape;
651651
shT axis_dst_stride;
652-
dpctl::tensor::py_internal::split_iteration_space(
653-
dst_shape_vec, dst_strides_vec, axis, axis + 1, orthog_dst_shape,
654-
axis_dst_shape, orthog_dst_strides, axis_dst_stride);
652+
split_iteration_space(dst_shape_vec, dst_strides_vec, axis, axis + 1,
653+
orthog_dst_shape, axis_dst_shape,
654+
orthog_dst_strides, axis_dst_stride);
655655

656656
assert(orthog_src_shape.size() == static_cast<std::size_t>(orthog_nd));
657657
assert(orthog_dst_shape.size() == static_cast<std::size_t>(orthog_nd));
@@ -667,7 +667,7 @@ std::pair<sycl::event, sycl::event>
667667
py::ssize_t orthog_src_offset(0);
668668
py::ssize_t orthog_dst_offset(0);
669669

670-
dpctl::tensor::py_internal::simplify_iteration_space(
670+
simplify_iteration_space(
671671
orthog_nd, _shape, orthog_src_strides, orthog_dst_strides,
672672
// output
673673
simplified_orthog_shape, simplified_orthog_src_strides,

dpctl_ext/tensor/libtensor/source/where.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ std::pair<sycl::event, sycl::event>
201201
py::ssize_t x2_offset(0);
202202
py::ssize_t dst_offset(0);
203203

204-
dpctl::tensor::py_internal::simplify_iteration_space_4(
204+
simplify_iteration_space_4(
205205
nd, x1_shape, cond_strides, x1_strides, x2_strides, dst_strides,
206206
// outputs
207207
simplified_shape, simplified_cond_strides, simplified_x1_strides,

0 commit comments

Comments
 (0)