Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Jan 19, 2025
1 parent 4b6b8a2 commit 3c8074e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions core/components/range_minimum_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ device_range_minimum_query<IndexType>::device_range_minimum_query(
: num_blocks_{static_cast<index_type>(
ceildiv(static_cast<index_type>(data.get_size()), block_size))},
lut_{data.get_executor()},
block_tree_indexs_{data.get_executor(),
static_cast<size_type>(num_blocks_)},
block_tree_indices_{data.get_executor(),
static_cast<size_type>(num_blocks_)},
block_argmin_storage_{
data.get_executor(),
static_cast<size_type>(block_argmin_view_type::storage_size(
Expand All @@ -45,7 +45,7 @@ device_range_minimum_query<IndexType>::device_range_minimum_query(
block_argmin_storage_.get_data(), block_argmin_num_bits, num_blocks_};
exec->run(make_compute_lookup_small(
values_.get_const_data(), static_cast<index_type>(values_.get_size()),
block_argmin, block_min_.get_data(), block_tree_indexs_.get_data()));
block_argmin, block_min_.get_data(), block_tree_indices_.get_data()));
auto superblocks =
superblock_view_type{block_min_.get_const_data(),
superblock_storage_.get_data(), num_blocks_};
Expand All @@ -61,7 +61,7 @@ device_range_minimum_query<IndexType>::get() const
return range_minimum_query{values_.get_const_data(),
block_min_.get_const_data(),
block_argmin_storage_.get_const_data(),
block_tree_indexs_.get_const_data(),
block_tree_indices_.get_const_data(),
superblock_storage_.get_const_data(),
lut_.get(),
static_cast<index_type>(values_.get_size())};
Expand Down
12 changes: 6 additions & 6 deletions core/components/range_minimum_query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct cartesian_tree {
// The root node of a Cartesian tree is its minimum, so we can
// enumerate all possible Cartesian trees by choosing all possible
// minimum positions, and the left and right subtrees/left and right
// halves around the minimum can be choosen independently.
// halves around the minimum can be chosen independently.
// This enumeration does not list representatives in order of their
// tree index, so we need to use compute_tree_index internally.
for (int min_pos = 0; min_pos < cur_num_nodes; min_pos++) {
Expand Down Expand Up @@ -558,7 +558,7 @@ class range_minimum_query {
const block_lookup_type* block_lut, index_type size)
: num_blocks_{static_cast<index_type>(ceildiv(size, block_size))},
values_{values},
block_tree_indexs_{block_tree_index},
block_tree_indices_{block_tree_index},
block_argmin_{block_argmin, ceil_log2_constexpr(block_size),
num_blocks_},
superblocks_{block_min, superblock_storage, num_blocks_},
Expand Down Expand Up @@ -588,8 +588,8 @@ class range_minimum_query {
const auto first_local = first - first_block_base;
const auto last_block_base = last_block * block_size;
const auto last_local = last - last_block_base;
const auto first_block_tree_index = block_tree_indexs_[first_block];
const auto last_block_tree_index = block_tree_indexs_[last_block];
const auto first_block_tree_index = block_tree_indices_[first_block];
const auto last_block_tree_index = block_tree_indices_[last_block];
// both values in the same block
if (first_block == last_block) {
const auto argmin =
Expand Down Expand Up @@ -647,7 +647,7 @@ class range_minimum_query {
private:
index_type num_blocks_;
const index_type* values_;
const uint16* block_tree_indexs_;
const uint16* block_tree_indices_;
bit_packed_span<int, index_type, const uint32> block_argmin_;
superblock_lookup_type superblocks_;
const block_lookup_type* block_lut_;
Expand Down Expand Up @@ -695,7 +695,7 @@ class device_range_minimum_query {
private:
index_type num_blocks_;
block_lut_type lut_;
array<uint16> block_tree_indexs_;
array<uint16> block_tree_indices_;
array<block_argmin_storage_type> block_argmin_storage_;
array<index_type> block_min_;
array<superblock_storage_type> superblock_storage_;
Expand Down

0 comments on commit 3c8074e

Please sign in to comment.