We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
rtensor
Hi,
When I am using xt::sort or xt::quantile on xt::rtensor, there seems to be some form of memory leak.
xt::sort
xt::quantile
xt::rtensor
For example, the following C++ function:
#include <xtensor/xsort.hpp> #include <xtensor-r/rtensor.hpp> #include <xtensor-r/rarray.hpp> #include <Rcpp.h> // [[Rcpp::plugins(cpp14)]] // [[Rcpp::export("sort_cpp")]] xt::rarray<double> sort_cpp(xt::rtensor<double, 4> q) { xt::rarray<double> arr = xt::sort(q, 3); return arr; }
when used repeatedly in R (even with explicit garbage collection), e.g.:
library(myTestLib) q = array( data=rep(c(0.6), 10 * 2 * 11 * 2080), dim=c(10, 2, 11, 2080) ) for (i in 1:1000) { myTestLib::sort_cpp(q) gc() }
will gradually use more and more memory as one progresses through the loop.
I have put together a small repository to demonstrate the potential memory leak: https://github.com/ThibHlln/myTestLib
Are you able to reproduce my problem? Do you notice a memory leak too?
Thanks.
The text was updated successfully, but these errors were encountered:
For information, the problem does not occur if rtensor are replaced with rarray.
rarray
Also, in a similar context, the problem does not occur either when using pytensor.
pytensor
Sorry, something went wrong.
No branches or pull requests
Hi,
When I am using
xt::sort
orxt::quantile
onxt::rtensor
, there seems to be some form of memory leak.For example, the following C++ function:
when used repeatedly in R (even with explicit garbage collection), e.g.:
will gradually use more and more memory as one progresses through the loop.
I have put together a small repository to demonstrate the potential memory leak: https://github.com/ThibHlln/myTestLib
Are you able to reproduce my problem? Do you notice a memory leak too?
Thanks.
The text was updated successfully, but these errors were encountered: