How do I make a determinant in ArrayFire?

How can I make a simple determinant in af :: array?

Trying to use in af :: array x: af :: ye (x) det (x) x.det ()

and doesn't work.

Can anyone help me?

 error: no matching function for call to β€˜det(af::array&)’
  if(det(x) == 0){

candidate: template<class T> T af::det(const af::array&)
     template<typename T> T det(const array &in);
                        ^

      

Thank.

+3


source to share


1 answer


According to the documentation , the function is templated. Instead, you should try something like this:



std::cout << af::det<float>(x);

      

+4


source







All Articles