-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
float type matrices? #4
Comments
As I am experimenting with this (I think i can avoid requiring the additional field mentioned above) do you have any previous code to check the With a matrix of 1000x1000 Directly on the matrix the object points to (returns 8) but it appears this is data type size: Rcpp::XPtr<BigMatrix> pMat(bigMatAddr);
return Rcpp::wrap(sizeof(pMat->matrix())); Trying to use matrix accessor (returns 40?): Rcpp::XPtr<BigMatrix> pMat(bigMatAddr);
MatrixAccessor<double> accMat(*pMat);
return Rcpp::wrap(sizeof(accMat)); |
Supporting floats would be nice and I support any movement toward C++11. It feels like there is still a lot of code we could eliminate by adding modern C++ features. I think biganalytics uses stable versions of calculations for things like variance so it seems like almost all of the work would be managing the element types. Would the linear algebra operations then be handled by armadillo? WRT sizeof, your |
There are float types within armadillo (e.g. |
It'll need to be added to the I can probably get to this on the weekend unless you want to take a look. |
It would likely be better if you to modify the |
That's fine. I'll send you a note when it's done. It seems like a nice feature and it provides the sanity check you're looking for to validate |
A new member of BigMatrix has been added, called |
OK, I need to be passing a pointer-pointer to the Create* functions. I'll fix it now. |
Yeah, that was it. Sorry and thanks for pointing it out. The fixed version is checked in. |
Nice! Any news on when this version will be available on CRAN? |
@sritchie73 We are currently working on some additional small fixes (see issue #15 and #16 ). I imagine once we have these issues resolved so R CMD check passes without error we will update it on CRAN. For now you can use the dev version from this repo. Did you have any additional thoughts @kaneplusplus ? |
Looking at #15 it doesn't seem like there was a consensus. I pointed out that it's nice when the behavior is similar across all platforms but I don't like Windows, I think development on Windows is miserable, and I think if you want to do any serious computing you should be on Linux. As a result we've traditionally done the minimum needed to get Windows building and I don't mind continuing with that policy. For #16 I vote for \dontrun. The check environment is a mysterious and beyond checking packages, it's not used. Are there objections or concerns for either? |
If CRAN doesn't have an issue with the Windows limitations I have no issue with it moving forward. Windows definitely is a pain for things like this. I think within bigmemory we will need \dontrun at the start of most of the examples however but ultimately really isn't an issue. |
I'm OK with doing \dontrun on the troublesome examples. I'm also not super Pete Peter M. Haverty, Ph.D. On Tue, Jun 2, 2015 at 9:34 AM, Charles Determan [email protected]
|
Given the focus of this package is to use the minimal amount of memory as efficiently as possible I believe it should include
big.matrix
objects of typefloat
. There may be situations in which single precision is sufficient and therefore would need only ~half the space as adouble
matrix. I know R does not have any single precision data type but seeing how all the 'heavy lifting' is done in C++ it seems like this should be an approachable thing. However I would like to have additional opinions on the following points before I begin writing a bunch of code.float
type matrices should be a part of this package?matrix_type
representing the byte size of each type. Continuing this withfloat
types would lead a conflict in variouscase
statements. The only solution I could come up off the top of my head was to add another field to thebig.matrix
object that is more specific to the data type and not the byte size. e.g.pMat->matrix_data_type()
would return a string (i.e. 'int', 'float', 'double', etc). This would lead to other code requiring updating, such as the Rcpp Gallery posts unless a more elegant solution can be conceived.typeid
from<typeinfo>
unless we would want to also begin moving towards C++11 standards where we could use the newerdecltype
function but possibly a moot point here (but worth beginning thoughts about C++11.Any thoughts are appreciated :)
The text was updated successfully, but these errors were encountered: