mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Eliminate c10::stoi,c10::stod,c10::stoull,c10::stoll (#109179)
We can remove these functions in favor of std ones. Pull Request resolved: https://github.com/pytorch/pytorch/pull/109179 Approved by: https://github.com/colesbury
This commit is contained in:
@ -292,7 +292,7 @@ static const std::vector<OperatorGeneratorArgs> opGenArgs{
|
||||
auto s = pop(stack).toString();
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
|
||||
std::string::size_type sz;
|
||||
int64_t val = static_cast<int64_t>(c10::stoll(s->string(), &sz));
|
||||
int64_t val = static_cast<int64_t>(std::stoll(s->string(), &sz));
|
||||
if (sz == s->string().size()) {
|
||||
push(stack, val);
|
||||
} else {
|
||||
@ -349,7 +349,7 @@ static const std::vector<OperatorGeneratorArgs> opGenArgs{
|
||||
auto s = pop(stack).toString();
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
|
||||
std::string::size_type sz;
|
||||
double b = c10::stod(s->string(), &sz);
|
||||
double b = std::stod(s->string(), &sz);
|
||||
if (sz == s->string().size()) {
|
||||
push(stack, b);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user