diff --git a/R-package/src/ndarray.cc b/R-package/src/ndarray.cc index 94d24f3fb46b..d08671a3f026 100644 --- a/R-package/src/ndarray.cc +++ b/R-package/src/ndarray.cc @@ -179,8 +179,8 @@ Rcpp::RObject NDArrayPacker::CreateNDArrayPacker() { } Rcpp::Dimension NDArray::dim() const { - mx_uint ndim; - const mx_uint *pshape; + int ndim; + const int *pshape; MX_CALL(MXNDArrayGetShape( ptr_->handle, &ndim, &pshape)); Rcpp::IntegerVector dat(pshape, pshape + ndim); diff --git a/R-package/src/symbol.cc b/R-package/src/symbol.cc index 031c9a254019..90ff9ef1dd67 100644 --- a/R-package/src/symbol.cc +++ b/R-package/src/symbol.cc @@ -167,8 +167,8 @@ Symbol::RObjectType Symbol::GetOutput(mx_uint index) const { // helper function to convert shape into Rcpp vector inline Rcpp::List BuildShapeData(mx_uint shape_size, - const mx_uint *shape_ndim, - const mx_uint **shape_data, + const int *shape_ndim, + const int **shape_data, const std::vector &names) { Rcpp::List ret(shape_size); for (mx_uint i = 0; i < shape_size; ++i) { @@ -185,7 +185,7 @@ SEXP Symbol::InferShape(const Rcpp::List& kwargs) const { << "Need to pass parameters in key=value style.\n"; std::vector keys = kwargs.names(); std::vector arg_ind_ptr(1, 0); - std::vector arg_shape_data; + std::vector arg_shape_data; for (size_t i = 0; i < kwargs.size(); ++i) { RCHECK(keys[i].length() != 0) @@ -197,14 +197,14 @@ SEXP Symbol::InferShape(const Rcpp::List& kwargs) const { std::vector c_keys = CKeys(keys); mx_uint in_shape_size; - const mx_uint *in_shape_ndim; - const mx_uint **in_shape_data; + const int *in_shape_ndim; + const int **in_shape_data; mx_uint out_shape_size; - const mx_uint *out_shape_ndim; - const mx_uint **out_shape_data; + const int *out_shape_ndim; + const int **out_shape_data; mx_uint aux_shape_size; - const mx_uint *aux_shape_ndim; - const mx_uint **aux_shape_data; + const int *aux_shape_ndim; + const int **aux_shape_data; int complete; MX_CALL(MXSymbolInferShape(