GeneralizedLossT(const T &a=kL2, const T &c=T(1))
Constructs a generalized loss with shape a and scale c.
static constexpr float kL2
Packet< T > value(const Packet< T > &sqrError) const
Returns the loss value for each lane of sqrError.
GeneralizedLossT< float > Base
SimdGeneralizedLossT(const T &a=Base::kL2, const T &c=T(1))
Constructs a SIMD generalized loss with shape a and scale c.
Packet< T > deriv(const Packet< T > &sqrError) const
Returns d(loss)/d(sqrError) for each lane of sqrError.
drjit::Packet< T, kSimdPacketSize > Packet
A fixed-size SIMD packet of kSimdPacketSize elements of type T.
Cross-platform SIMD foundation built on the DrJit library.