Skip to content

Commit 5515f9e

Browse files
committed
Bugfix: Set return type of torch_tensor_get_sizes to be long long int*.
1 parent 8121ec6 commit 5515f9e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ctorch.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ int torch_tensor_get_rank(const torch_tensor_t tensor)
234234
return t->sizes().size();
235235
}
236236

237-
const long int* torch_tensor_get_sizes(const torch_tensor_t tensor)
237+
const long long int* torch_tensor_get_sizes(const torch_tensor_t tensor)
238238
{
239239
auto t = reinterpret_cast<torch::Tensor*>(tensor);
240240
return t->sizes().data();

src/ctorch.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ EXPORT_C int torch_tensor_get_rank(const torch_tensor_t tensor);
125125
* @param Torch Tensor to determine the rank of
126126
* @return pointer to the sizes array of the Torch Tensor
127127
*/
128-
EXPORT_C const long int* torch_tensor_get_sizes(const torch_tensor_t tensor);
128+
EXPORT_C const long long int* torch_tensor_get_sizes(const torch_tensor_t tensor);
129129

130130
/**
131131
* Function to delete a Torch Tensor to clean up

0 commit comments

Comments
 (0)