Skip to content

Commit 4ae188d

Browse files
committed
update variable names
1 parent 9e18afb commit 4ae188d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/llama-bench/llama-bench.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,17 +196,17 @@ static std::string pair_str(const std::pair<int, int> & p) {
196196
}
197197

198198
static std::vector<int> parse_int_range(const std::string & s) {
199-
// start[-end[+step]][,start[-end[+step]]...]
199+
// first[-last[+step]][,first[-last[+step]]...]
200200
std::regex range_regex(R"(^(\d+)(?:-(\d+)(?:\+(\d+))?)?(,|$))");
201201
std::smatch match;
202202
std::string::const_iterator search_start(s.cbegin());
203203
std::vector<int> result;
204204
while (std::regex_search(search_start, s.cend(), match, range_regex)) {
205-
int start = std::stoi(match[1]);
206-
int end = match[2].matched ? std::stoi(match[2]) : start;
205+
int first = std::stoi(match[1]);
206+
int last = match[2].matched ? std::stoi(match[2]) : first;
207207
int step = match[3].matched ? std::stoi(match[3]) : 1;
208208

209-
for (int i = start; i <= end; i += step) {
209+
for (int i = first; i <= last; i += step) {
210210
result.push_back(i);
211211
}
212212
search_start = match.suffix().first;

0 commit comments

Comments
 (0)