Add special functions to Eigen: lgamma, erf, erfc.

Includes CUDA support and unit tests.
This commit is contained in:
Eugene Brevdo
2015-12-07 15:24:49 -08:00
parent 7dfe75f445
commit fa4f933c0f
14 changed files with 513 additions and 1 deletions

View File

@@ -294,6 +294,12 @@ struct stem_function
};
}
// SpecialFunctions forward declarations
namespace internal {
template <typename Scalar> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar __lgamma(Scalar x);
template <typename Scalar> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar __erf(Scalar x);
template <typename Scalar> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Scalar __erfc(Scalar x);
} // end namespace Eigen
#endif // EIGEN_FORWARDDECLARATIONS_H

View File

@@ -96,7 +96,8 @@
STORAGE_LAYOUT_DOES_NOT_MATCH,
EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT__INVALID_COST_VALUE,
THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS,
MATRIX_FREE_CONJUGATE_GRADIENT_IS_COMPATIBLE_WITH_UPPER_UNION_LOWER_MODE_ONLY
MATRIX_FREE_CONJUGATE_GRADIENT_IS_COMPATIBLE_WITH_UPPER_UNION_LOWER_MODE_ONLY,
THIS_TYPE_IS_NOT_SUPPORTED
};
};