The idea with IntegerVector for shape is great. I had to fix some minor
stuff in xtensor but it appears to be working.
Ok, good to know about the shape copy!
Yeah, this is literally a weekend project for now (and I haven't used R
before) so this was just a quick-n-dirty test script.
Cheers,
Wol
On 7 June 2017 at 09:29, Romain Francois wrote:
| Hi,
|
| Instead of doing that:
|
| const int vtype = traits::r_sexptype_traits::rtype;
| SEXP shape_sxp = Rf_allocVector(vtype, shape.size());
|
| Perhaps your rxarray object could hold an IntegerVector. Also not quite sure
| why you use the f
Hi,
Instead of doing that:
const int vtype = traits::r_sexptype_traits::rtype;
SEXP shape_sxp = Rf_allocVector(vtype, shape.size());
Perhaps your rxarray object could hold an IntegerVector. Also not quite sure
why you use the first line at all, which does not depend on T, so vtype is
always
On 6 June 2017 at 18:01, Wolf Vollprecht wrote:
| Ok, I think I got the idea.
|
| In the R->xtensor bindings, we always work directly on memory allocated
through
| R (either passed in from R or allocated from C++ code).
|
| The review-relevant lines are really only ~10 lines: https://github.co
Ok, I think I got the idea.
In the R->xtensor bindings, we always work directly on memory allocated
through R (either passed in from R or allocated from C++ code).
The review-relevant lines are really only ~10 lines: https://github.com/
QuantStack/xtensor-r/blob/master/inst/include/xtensor-r/rxar
On 6 June 2017 at 17:06, Dirk Eddelbuettel wrote:
| The general idea when working with R objects is that
|
| -- on the way in from R to the C++ functions we construct object such that
| the existing memory (from R) is used; one example is how RcppArmadillo
| uses the 'advanced' constr
Howdy,
On 6 June 2017 at 14:15, Wolf Vollprecht wrote:
| I put together a small proof of concept for the xtensor R bindings over the
| weekend.
| It lives here: https://github.com/QuantStack/xtensor-r
Nice! Not sure I have spare cycles right now for this but that is very welcome.
| xtensor i
Dear RCpp developer community,
I put together a small proof of concept for the xtensor R bindings over the
weekend.
It lives here: https://github.com/QuantStack/xtensor-r
xtensor is an exciting C++ library which provides a unified C++ tensor
interface for Python/NumPy, Julia and soon R.
My bigge