Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRcpp is inconsistent with RInternals integers types #369
Comments
|
I think first two are enough to fix your problem, right? |
|
The last is probably not necessary to solve my problem. However, this might solve an issue while calling the 'Vector::at( const size_t& i)' method with large vectors. The third change is required because 'Matrix::at' calls 'Vector::offset ' |
|
Yes. Please set a new PR, which will make our discussion easier. But I don't think I have access to a machine with enough memory for testing. |
|
I do. But this needs more discussion / calibration against 'pure R'. I recall vaguely that 'rows time columns' is allowed at more than 2^31-1, hence R_xlen_t for counting, Each row / col index is still capped. Correct, or am I hallucinating? |
|
I guess you are correct
The changes are consistent with this behaviour. |
Rcpp is inconsistent with RInternals integers types.
At some places in the code, 'size_t' and 'int' are used instead of 'R_xlen_t '
For all I know, it causes the following issues:
I proposed a time ago some patches #338
Some of them were subject of discussion because they changed the Rcpp interface.
However, some changes are mandatory to solve this issue:
Dimension::prod
From
To
Matrix::Matrix
From
To
Matrix::offset
From
To
Vector::offset
From
To
Vector::offset
From
To