Skip to content

Commit bd8b630

Browse files
authored
Removing static qualifer from handleNegativeAxis functions (#320)
1 parent 66c78b8 commit bd8b630

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin_op_importers.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ NodeImportResult staticInputSliceHelper(IImporterContext* ctx, nvinfer1::ITensor
15791579

15801580
for (int axis = 0; axis < rank; ++axis)
15811581
{
1582-
static const auto handleNegativeIndex = [&ctx, &axis, &shape](int64_t index) -> int64_t
1582+
const auto handleNegativeIndex = [&ctx, &axis, &shape](int64_t index) -> int64_t
15831583
{
15841584
if (std::abs(index) > static_cast<int64_t>(std::numeric_limits<int32_t>::max()))
15851585
{
@@ -1619,11 +1619,11 @@ NodeImportResult dynamicInputSliceHelper(IImporterContext* ctx, nvinfer1::ITenso
16191619
std::vector<nvinfer1::ITensor*> startIndices{};
16201620
std::vector<nvinfer1::ITensor*> sizeIndices{};
16211621
std::vector<nvinfer1::ITensor*> strideIndices{};
1622-
nvinfer1::Dims indexShape{1, 1};
1622+
nvinfer1::Dims indexShape{1, {1}};
16231623

16241624
for (int i = 0; i < rank; ++i)
16251625
{
1626-
static const auto handleNegativeIndex = [&ctx, &indexShape, &tensor, &i](int64_t index) -> nvinfer1::ITensor*
1626+
const auto handleNegativeIndex = [&ctx, &indexShape, &tensor, &i](int64_t index) -> nvinfer1::ITensor*
16271627
{
16281628
if (std::abs(index) > static_cast<int64_t>(std::numeric_limits<int32_t>::max()))
16291629
{
@@ -1743,7 +1743,7 @@ DEFINE_BUILTIN_OP_IMPORTER(Slice)
17431743
{
17441744
// Do a sanity check here that the combination of starts, ends, and steps does not cause a size 0 for non-dynamic dimensions.
17451745
auto axis = axes.at(i);
1746-
static const auto handleNegativeIndex = [&axis, &dims](int64_t index) -> int64_t
1746+
const auto handleNegativeIndex = [&axis, &dims](int64_t index) -> int64_t
17471747
{
17481748
return (index < 0) ? (dims.d[axis] + index) : index;
17491749
};

0 commit comments

Comments
 (0)