Re: [Rcpp-devel] Is there an easy way to convert Rcpp code to pure cpp code to build a command line tool

2017-05-04 Thread Yue Li
Got it. Thank you so much Dirk! Yue > On May 4, 2017, at 10:33 AM, Dirk Eddelbuettel wrote: > > > On 4 May 2017 at 10:16, Yue Li wrote: > | Dear List, > | > | This is probably a dumb question: > | > | Is there an easy way to convert Rcpp code to pure cpp code to b

[Rcpp-devel] Is there an easy way to convert Rcpp code to pure cpp code to build a command line tool

2017-05-04 Thread Yue Li
Dear List, This is probably a dumb question: Is there an easy way to convert Rcpp code to pure cpp code to build a command line tool? I was thinking about something similar to the 'python setup.py install’ thing. Once the software is built, the binary executable can be added to /usr/bin/ and

Re: [Rcpp-devel] deprecated log_max warning

2016-04-26 Thread Yue Li
I see. Thank you Dirk. Yue > On Apr 26, 2016, at 11:33 AM, Dirk Eddelbuettel wrote: > > > On 21 April 2016 at 16:31, Yue Li wrote: > | Thank you Dirk and Yixuan! Indeed, '-Wno-deprecated-declarations’ suppresses > | the warning. > > And just to follow-up, this h

Re: [Rcpp-devel] deprecated log_max warning

2016-04-21 Thread Yue Li
xp.hpp, trunc_exp() > | calles Math::log_max() that has already been labeled deprecated. > > Good catch. I concur. CC'ing Conrad. > > Dirk > > > | Best, > | Yixuan > | > | 2016-04-21 15:51 GMT-04:00 Dirk Eddelbuettel <mailto:e...@debian.org>

[Rcpp-devel] deprecated log_max warning

2016-04-21 Thread Yue Li
Dear List, Just a super naive (dumb) question: after upgrading to RcppArmadillo_0.6.700.3.0 Rcpp_0.12.4, I receive compilation warning ''log_max' has been explicitly marked deprecated here” on every line of my code that uses ‘trunc_exp’ or ‘trunc_log’. I wonder how to fix this. The code to rep

Re: [Rcpp-devel] clang-omp and clang++ -fopenmp compiler (OS X)

2016-04-05 Thread Yue Li
CXXFLAGS += -O3 -Wall -pipe -Wno-unused -pedantic -fopenmp > > You can add or change flags in this file. > > Best, > > KK > > On Tue, Apr 5, 2016 at 10:14 AM, Yue Li <mailto:gorilla...@gmail.com>> wrote: > Dear List, > > I’m new to openmp and wonder if a

[Rcpp-devel] clang-omp and clang++ -fopenmp compiler (OS X)

2016-04-05 Thread Yue Li
Dear List, I’m new to openmp and wonder if anyone know how to add -fopenmp to clang++ such that it can compile successfully without error using sourceCpp. Using the dmvnorm_arma as example (http://gallery.rcpp.org/articles/dmvnorm_arma/ ): I got

Re: [Rcpp-devel] rwishart Rcpp implementation

2015-06-11 Thread Yue Li
t;> // top triangular is NaN ### > <> mat C = trans(trimatl(T)) * chol(Vm); > <> mat CI = C.i(); > <> > <>// C is the upper triangular root of Wishart > <>// therefore, W=C'C this is the LU decomposition > <>// Inv(W) = CICI'

[Rcpp-devel] rwishart Rcpp implementation

2015-06-11 Thread Yue Li
Dear List, I wonder if anyone could share their Rcpp code for an equivalence of rWishart. I’ve come across a similar question in the forum: http://stackoverflow.com/questions/23463852/generate-wishart-distribution-using-rwishart-within-rcpp

Re: [Rcpp-devel] failed to compile code on the server with simple operations on matrices with type fmat {RcppArmadillo}

2015-06-03 Thread Yue Li
Thanks for looking into it. I will try to get it work on the server. > On Jun 3, 2015, at 6:42 AM, Dirk Eddelbuettel wrote: > > > It also works for me on Linux: > > R> sourceCpp("/tmp/yueli.cpp") > > R> set.seed(42) > > R> x <- matrix(rnorm(4),2,2) > > R> y <- matrix(rnorm(4),2,2) > > R>

[Rcpp-devel] failed to compile code on the server with simple operations on matrices with type fmat {RcppArmadillo}

2015-06-02 Thread Yue Li
Dear List, I’m having an issue with compiling Rcpp code using ‘fmat’ matrix type on the server (Linux distro: CentOS release 5.11 (Final)) and wondering if someone has a quick fix. Basically, the following code works fine on my Macbook (R 3.2) but not on the server (Run/sessionInfo pasted). A

Re: [Rcpp-devel] float for BigMatrix

2015-06-02 Thread Yue Li
e able to > create a big matrix with a type float. You will just need to explicitly tell > R to store the data as a float, i.e. as.big.matrix(x, type="float"). Be > warned though, your print code will probably segfault when you create the > arma::Mat and try to print the

Re: [Rcpp-devel] float for BigMatrix

2015-06-01 Thread Yue Li
trix”, “bigmemory”)), so you wouldn’t be able to access the float > matrix from R as a big.matrix (without casting it back to a double) anyway. > > Regards, > > Scott > > > On 2 June 2015 at 12:58, Yue Li <mailto:gorilla...@gmail.com>> wrote: > Dear Li

[Rcpp-devel] float for BigMatrix

2015-06-01 Thread Yue Li
Dear List, I wonder if there is a way to convert a big matrix to ‘float’ instead of ‘double’ within a Rcpp program. The reason for using float is mainly for performance improvement. For instance, I have a simple function named ‘print_bigmat’ as shown below. As shown in the output, ‘double_bigm

Re: [Rcpp-devel] examples of using cula matrix multiplication in Rcpp

2015-05-16 Thread Yue Li
Thanks for the quick insightful replies! I will look into the solutions and keep the list posted on any progress on this end. Yue > On May 16, 2015, at 12:10 PM, Dirk Eddelbuettel wrote: > > > On 16 May 2015 at 17:05, Sean O'Riordain wrote: > | Some students I have been working with managed t

[Rcpp-devel] examples of using cula matrix multiplication in Rcpp

2015-05-16 Thread Yue Li
Dear List, I wonder if anyone worked on incorporating CULA tools library functionality into Rcpp. How much speed gain on top of Rcpp do we expect on basic operation like matrix multiplication? In particular, I’m currently usnig RArmadillo to seamlessly perform matrix multiplication. But the s

Re: [Rcpp-devel] build error on a starter package made from RcppArmadillo.package.skeleton

2015-05-08 Thread Yue Li
-error > > <http://www.thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error> > > > > From: rcpp-devel-boun...@lists.r-forge.r-project.org > [mailto:rcpp-devel-boun...@lists.r-forge.r-project.org] On Behalf Of Yue Li > Sent: Friday

[Rcpp-devel] build error on a starter package made from RcppArmadillo.package.skeleton

2015-05-08 Thread Yue Li
Dear List, I’m new to Rcpp and RcppArmadillo and testing out the skeleton on RcppArmadillo. I have the following error when trying to build it. I’m using OS 10.10.3 on a Macbook Pro. It seems there is some missing library. Any suggestion would be greatly appreciated. Thanks much, Yue In R: R