WIP (common)

This commit is contained in:
Ronan Collobert
2025-10-31 09:40:13 -07:00
parent 5baa361779
commit 5a306d3495
2 changed files with 4 additions and 4 deletions

View File

@@ -24,8 +24,8 @@ std::tuple<int64_t, Strides> prepare_slice(
void shared_buffer_slice( void shared_buffer_slice(
const array& in, const array& in,
const Strides& out_strides, const Strides& out_strides,
size_t data_offset, int64_t data_offset,
size_t data_size, int64_t data_size,
array& out) { array& out) {
// Compute row/col contiguity // Compute row/col contiguity
auto [no_bsx_size, is_row_contiguous, is_col_contiguous] = auto [no_bsx_size, is_row_contiguous, is_col_contiguous] =
@@ -61,7 +61,7 @@ void slice(
if (data_end < 0) { if (data_end < 0) {
data_end += in.data_size(); data_end += in.data_size();
} }
size_t data_size = (data_end - data_offset); int64_t data_size = (data_end - data_offset);
shared_buffer_slice(in, inp_strides, data_offset, data_size, out); shared_buffer_slice(in, inp_strides, data_offset, data_size, out);
} }

View File

@@ -162,7 +162,7 @@ struct ContiguousIterator {
}; };
inline auto check_contiguity(const Shape& shape, const Strides& strides) { inline auto check_contiguity(const Shape& shape, const Strides& strides) {
size_t no_broadcast_data_size = 1; int64_t no_broadcast_data_size = 1;
int64_t f_stride = 1; int64_t f_stride = 1;
int64_t b_stride = 1; int64_t b_stride = 1;
bool is_row_contiguous = true; bool is_row_contiguous = true;