Corrected #ifdef for Eigen compatibility
This commit is contained in:
parent
4371ef8162
commit
0607618407
@ -693,6 +693,8 @@ template <typename T> class Array {
|
|||||||
* Its self assigning version is transpose. This is restricted to numerical types.
|
* Its self assigning version is transpose. This is restricted to numerical types.
|
||||||
* \brief Host only
|
* \brief Host only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef CUDATOOLS_USE_EIGEN
|
||||||
Array transposed() const {
|
Array transposed() const {
|
||||||
static_assert(is_host_num<T>, "Function only available on host-compatible numeric types.");
|
static_assert(is_host_num<T>, "Function only available on host-compatible numeric types.");
|
||||||
CT_ERROR_IF(shape().axes(), !=, 2, "Tranpose can only occur on two-dimensional arrays");
|
CT_ERROR_IF(shape().axes(), !=, 2, "Tranpose can only occur on two-dimensional arrays");
|
||||||
@ -722,6 +724,7 @@ template <typename T> class Array {
|
|||||||
Array<T> inv(shape());
|
Array<T> inv(shape());
|
||||||
inv.eigenMap() = this->eigenMap().inverse();
|
inv.eigenMap() = this->eigenMap().inverse();
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pins the memory (page locks) for faster memory transfer in concurrent
|
* Pins the memory (page locks) for faster memory transfer in concurrent
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user