Autumn sale: up to 25% off (22 OCT - 1 NOV)

KFR 5 has been released

1 December 2022

KFR 5 has been released with new features and performance improvements, including multidimensional arrays, exceptions, and better performance.

Tensors

New Tensor class for multidimensional data (like NumPy’s ndarray).

Tensor class supports:

  • Slices
  • Views
  • Custom memory layout
  • Automatic vectorization for maximum performance
  • Zero-copy reshaping and transpose
  • Zero-copy conversion from STL containers

Updated Expressions

All built-in expressions support multiple dimensions.

expression_traits<T> introduced to support interpreting any object as a KFR expression.

Out-of-class assign operators for all input & output expressions.

Improved performance

The performance of code compiled on GCC and MSVC has been significantly improved.

MSVC build times have been reduced by up to 50% and memory consumption has been cut.

Better control of errors

KFR 5 added exception support that can be configured to throw an exception, call user-supplied function or std::abort.

More functions

  • Histogram computation.
  • Normal (Gaussian) distribution for the random number generator.
  • Template parameter deduction for vec, so vec{1, 2} is the same as vec<int, 2>{1, 2}

KFR 4 support

KFR 4 is still supported and will receive fixes and improvements, but the main development focuses on KFR 5.

See on GitHub