Skip to content

Commit

Permalink
Update substring calculation function name
Browse files Browse the repository at this point in the history
  • Loading branch information
adityagoel4512 committed Jan 9, 2024
1 parent 7109712 commit e6f5371
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/cpu/nn/string_split.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ONNX_CPU_OPERATOR_KERNEL(StringSplit, 20,
/// Calculate substrings in ``str`` delimited by ``delimiter``. A maximum of ``max_splits`` splits are permitted.
/// Returns a vector of string slices into ``str`` representing the substrings as string views. The user must ensure
/// the returned views' lifetime does not exceed ``str``'s.
InlinedVector<std::string_view> FillSubstrings(std::string_view str, std::string_view delimiter, int64_t max_splits) {
InlinedVector<std::string_view> ComputeSubstrings(std::string_view str, std::string_view delimiter, int64_t max_splits) {
InlinedVector<std::string_view> output;
if (str.empty()) {
return output;
Expand Down Expand Up @@ -78,7 +78,7 @@ Status StringSplit::Compute(OpKernelContext* context) const {

auto input_slice_iterator = input_slices.begin();
for (auto input_iter = input_data.begin(); input_iter != input_data.end(); input_iter++, input_slice_iterator++, num_tokens_iter++) {
auto substrs = FillSubstrings(*input_iter, delimiter_, maxsplit_);
auto substrs = ComputeSubstrings(*input_iter, delimiter_, maxsplit_);
auto substr_count = static_cast<int64_t>(substrs.size());
input_slices.push_back(substrs);
last_dim = std::max(last_dim, substr_count);
Expand Down

0 comments on commit e6f5371

Please sign in to comment.