Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

Problem compiling with armadillo

$
0
0

Hello all,

I'm using aramadillo (http://arma.sourceforge.net) to elegantly manipulate arrays. All was working well till the last version (4.650.2).
Now it fails compiling with icpc (15.0.1, Linux) pretending there is a resolution problem.  The snippet code still compile fine with g++(4.9.2) and also clang (3.5) showing no error or warning.
I've filed a bug to armadillo team, but they told me it is an Intel issue.

I would be happy if any solution exists to solve this issue as I both need using armadillo and the intel compiler for speed and efficency.

Thanks in advance for any answer.

Daniel

Here is the code:

#define ARMA_DONT_USE_WRAPPER
#define ARMA_DONT_USE_HDF5
#define ARMA_DONT_USE_BLAS
#include <armadillo>

using namespace std;
using namespace arma;

#define LEN 50

int main()
{
 mat::fixed<LEN,9> beta;
 vec::fixed<LEN> alpha;
 mat::fixed<LEN,9> ash1;

 ash1=repmat(alpha,1,9)-beta;

 return(0);
}

and the compilation error:

~ $ icpc -I armadillo-4.650.2/include/  bugarma.cpp
bugarma.cpp(17): error: more than one operator "=" matches these operands:
            function template "const arma::Mat<double> &arma::Mat<eT>::operator=(const arma::eGlue<T1, T2, eglue_type> &) [with eT=double]"
            function template "const arma::Mat<double> &arma::Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::operator=(const arma::eGlue<T1, T2, eglue_type> &) [with eT=double, fixed_n_rows=50U, fixed_n_cols=9U]"
            operand types are: arma::Mat<double>::fixed<50U, 9U> = const arma::eGlue<arma::Op<arma::Mat<double>, arma::op_repmat>, arma::Mat<double>::fixed<50U, 9U>, arma::eglue_minus>
   ash1=repmat(alpha,1,9)-beta;
       ^
compilation aborted for bugarma.cpp (code 2)

Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>