abs -> std::abs

This commit is contained in:
Dun Liang 2021-03-11 20:42:17 +08:00
parent 9b67168f18
commit f240c5a3de
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
# This file is subject to the terms and conditions defined in # This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source code package. # file 'LICENSE.txt', which is part of this source code package.
# *************************************************************** # ***************************************************************
__version__ = '1.2.2.44' __version__ = '1.2.2.45'
from . import lock from . import lock
with lock.lock_scope(): with lock.lock_scope():
ori_int = int ori_int = int

View File

@ -81,8 +81,8 @@ void ArrayOp::jit_prepare(JK& jk) {
// fill or find cbuffer for const var pass // fill or find cbuffer for const var pass
if (output->dtype().dsize() == 4) { if (output->dtype().dsize() == 4) {
auto x = abs(ptr<int32>()[0]); auto x = std::abs(ptr<int32>()[0]);
auto y = abs(ptr<float32>()[0]); auto y = std::abs(ptr<float32>()[0]);
auto z = ptr<uint32>()[0]; auto z = ptr<uint32>()[0];
if ((x<=2) || (y==1.0f || y==2.0f)) if ((x<=2) || (y==1.0f || y==2.0f))
jk << _CS("[o:") << z << ']'; jk << _CS("[o:") << z << ']';