Skip to content

sqrew/carp-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

carp-matrix

A robust, low-level numerical matrix library for the Carp language.

Features

  • Safe & Unsafe API: Choose between performance and safety with Result-returning functions or unsafe- variants.
  • True In-Place Mutation: Memory-efficient operations like add!, sub!, and hadamard! that modify data without new allocations.
  • Cache-Aware Performance: Optimized matrix multiplication using transposed layouts for better cache locality.
  • Zero-Copy Structural Ops: Metadata-only reshape and flatten (currently behaves as copy due to Carp deftype semantics, but architected for minimal overhead).
  • Comprehensive API: Includes zeros, identity, random, transpose, dot, mat-vec, outer-product, approx=, and more.
  • Rigorous Testing: Deep verification of mathematical identities and edge cases.

Installation

Add this to your project by loading matrix.carp.

(load "path/to/carp-matrix/matrix.carp")
(use Mat)

Running Tests

carp -x test/matrix_test.carp

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors