tflite-micro/tensorflow/lite/kernels/internal/runtime_shape.cc
Shlomi Regev b991e726b0
Fix a linker error: undefined kMaxSmallSize (#2476)
When building with a recent version of xt-clang and -std=c++11, the linker errs on missing definition of a static constexpr class member. In C++11, static class members still had to be defined in a C++11 file and TFLM code is expected to be compatible with C++11.

BUG=323856831
2024-02-27 14:35:14 +00:00

23 lines
892 B
C++

/* Copyright 2023 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/lite/kernels/internal/runtime_shape.h"
namespace tflite {
// Defining a constexpr static class member is necessary in C++11
constexpr int tflite::RuntimeShape::kMaxSmallSize;
} // namespace tflite