2017-06-14 35 views
3

如何在af ::數組中創建一個簡單行列式?如何在ArrayFire中做一個行列式?

Tryed在AF使用::數組x: AF :: DET(X) DET(X) x.det()

和不工作。

有人可以幫助我嗎?

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); 
         ^

謝謝。

回答

4

根據documentation,該功能是模板化的。你應該嘗試這樣的代替︰

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

謝謝男人... aparently解決。 –