From 3af5a2a2cfeecd5fe3cb0c8445688abe4f229cc1 Mon Sep 17 00:00:00 2001 From: Edward Chen <18449977+edgchen1@users.noreply.github.com> Date: Wed, 11 Mar 2020 22:07:24 +0000 Subject: [PATCH] Change Tensor::[Set]ByteOffset() to use ptrdiff_t. --- include/onnxruntime/core/framework/tensor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/onnxruntime/core/framework/tensor.h b/include/onnxruntime/core/framework/tensor.h index e53544b9ff..447e6cff75 100644 --- a/include/onnxruntime/core/framework/tensor.h +++ b/include/onnxruntime/core/framework/tensor.h @@ -194,7 +194,7 @@ class Tensor final { * Get the byte offset with respect to the p_data * @warning this is a temporary solution for reusing the buffer bigger than needed. */ - inline int64_t ByteOffset() const { + inline ptrdiff_t ByteOffset() const { return byte_offset_; } @@ -202,7 +202,7 @@ class Tensor final { * Set the byte offset with respect to the p_data * @warning this is a temporary solution for reusing the buffer bigger than needed. */ - inline void SetByteOffset(int64_t byte_offset) { + inline void SetByteOffset(ptrdiff_t byte_offset) { byte_offset_ = byte_offset; }