Fixes #2735: Component-wise cbrt

Reference issue

The MR implements the feature request in #2735 (closed), to add cbrt to the supported component-wise operations to arrays and matrices.

What does this implement/fix?

Following the current implementation of the sqrt/cWiseSqrt, I added the functions and structs to enable cbrt calculations using std::cbrt, as well as the mkl vml implementation of cbrt.

Additional information

I added tests for cbrt to the existing cWise test cases, as well as adding some documentation. The main thing that I am unsure about is the functor_traits specialization for the scalar_cbrt_op

undefined template struct scalar_cbrt_op { EIGEN_DEVICE_FUNC inline const Scalar operator()(const Scalar& a) const { return numext::cbrt(a); } };

template struct functor_traits<scalar_cbrt_op > { enum { Cost = 5 * NumTraits::MulCost, PacketAccess = false }; };

For this I copied from the acosh functor_traits since it also doesn't have built-in architecture support (I think...). I kept the Cost as 5 * NumTraits::MulCost, but I don't know if this is correct (or if it even matters).

Lastly, I am having trouble running all of the tests and building all the docs on my local (windows) machine, so I'm hoping that the pipelines will point out anything I missed.

Merge request reports

Loading