Skip to content

Commit 0b5b197

Browse files
committed
Sync from upstream TF.
1 parent 51bee03 commit 0b5b197

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tensorflow/lite/kernels/internal/reference/concatenation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
#define TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_CONCATENATION_H_
1818

1919
#include <algorithm>
20+
#include <cstddef>
2021

2122
#include "tensorflow/lite/kernels/internal/common.h"
2223
#include "tensorflow/lite/kernels/internal/compatibility.h"
@@ -109,7 +110,7 @@ inline void Concatenation<Int4>(const ConcatenationParams& params,
109110
// not garbage.
110111
// Note: output_shape.FlatSize() gives number of elements (nibbles).
111112
// Bytes needed: (elements + 1) / 2.
112-
memset(output_ptr, 0, (output_shape.FlatSize() + 1) / 2);
113+
memset(output_ptr, 0, (static_cast<size_t>(output_shape.FlatSize()) + 1) / 2);
113114

114115
int64_t output_offset = 0;
115116
for (int k = 0; k < outer_size; k++) {

0 commit comments

Comments
 (0)