Skip to content

Commit

Permalink
Fix dimension vector type for dynetDim in C-API.
Browse files Browse the repository at this point in the history
  • Loading branch information
chantera committed Oct 2, 2018
1 parent 33638c7 commit 05c8856
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/c/dynet_c/dim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DYNET_C_STATUS dynetCreateDimWithDimensions(
const uint32_t *dims, size_t n, dynetDim_t **newobj) try {
DYNET_C_CHECK_NOT_NULL(dims);
DYNET_C_CHECK_NOT_NULL(newobj);
*newobj = to_c_ptr(new dynet::Dim(std::vector<int64_t>(dims, dims + n)));
*newobj = to_c_ptr(new dynet::Dim(std::vector<long>(dims, dims + n)));
return DYNET_C_OK;
} DYNET_C_HANDLE_EXCEPTIONS

Expand All @@ -29,7 +29,7 @@ DYNET_C_STATUS dynetCreateDimWithDimensionsAndBatch(
DYNET_C_CHECK_NOT_NULL(dims);
DYNET_C_CHECK_NOT_NULL(newobj);
*newobj = to_c_ptr(
new dynet::Dim(std::vector<int64_t>(dims, dims + n), batch));
new dynet::Dim(std::vector<long>(dims, dims + n), batch));
return DYNET_C_OK;
} DYNET_C_HANDLE_EXCEPTIONS

Expand Down

0 comments on commit 05c8856

Please sign in to comment.