Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static-dispatch versions #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 66 additions & 2 deletions num-utils.asd
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,38 @@
(:file "test-utilities")
(:file "pkgdcl")))

(defsystem "num-utils/static-dispatch"
:description "Numerical utilities for Common Lisp enhanced by STATIC-DISPATCH."
:depends-on (#:anaphora
#:alexandria
#:alexandria+
#:array-operations
#:select
#:let-plus
#:static-dispatch)
:in-order-to ((test-op (test-op "num-utils/static-dispatch/tests")))
:pathname "static-dispatch/"
:serial t
:components
((:file "packages")
(:file "utilities")
(:file "num=")
(:file "arithmetic")
;; (:file "arithmetic-type") ; now in src/old/ Looks like it was a WIP
(:file "elementwise")
(:file "extended-real")
(:file "interval")
(:file "print-matrix")
(:file "matrix")
(:file "matrix-shorthand")
(:file "chebyshev")
(:file "polynomial")
(:file "rootfinding")
(:file "quadrature")
(:file "log-exp")
(:file "test-utilities")
(:file "pkgdcl")))

(defsystem "num-utils/tests"
:version "1.0.0"
:description "Unit tests for NUM-UTILS."
Expand All @@ -51,7 +83,7 @@
#+asdf-unicode :encoding #+asdf-unicode :utf-8
:depends-on (#:num-utils
#:fiveam
#:select) ; matrix test needs this
#:select) ; matrix test needs this
:pathname "tests/"
:serial t
:components
Expand All @@ -75,4 +107,36 @@
:perform (test-op (o s)
(uiop:symbol-call :fiveam :run!
(uiop:find-symbol* :all-tests
:num-utils-tests))))
:num-utils-tests))))

(defsystem "num-utils/static-dispatch/tests"
:description "Unit tests for NUM-UTILS/STATIC-DISPATCH."
:license "Same as NUM-UTILS -- this is part of the NUM-UTILS library."
#+asdf-unicode :encoding #+asdf-unicode :utf-8
:depends-on (#:num-utils/static-dispatch
#:fiveam
#:select) ; matrix test needs this
:pathname "static-dispatch-tests/"
:serial t
:components
((:file "test-package")
(:file "main")
;; in alphabetical order
(:file "arithmetic")
;; (:file "arithmetic-type") ; No tests included in Papp's version
(:file "chebyshev")
(:file "polynomial")
(:file "elementwise")
(:file "extended-real")
(:file "interval")
(:file "matrix")
(:file "matrix-shorthand")
(:file "num=")
(:file "quadrature")
(:file "rootfinding")
(:file "log-exp")
(:file "utilities"))
:perform (test-op (o s)
(uiop:symbol-call :fiveam :run!
(uiop:find-symbol* :all-tests
:num-utils-tests))))
1 change: 1 addition & 0 deletions static-dispatch-tests/arithmetic.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/chebyshev.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/elementwise.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/extended-real.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/interval.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/log-exp.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/main.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/matrix-shorthand.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/matrix.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/num=.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/polynomial.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/quadrature.lisp
1 change: 1 addition & 0 deletions static-dispatch-tests/rootfinding.lisp
26 changes: 26 additions & 0 deletions static-dispatch-tests/test-package.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
;;; -*- Mode: LISP; Base: 10; Syntax: ANSI-Common-Lisp; Package: CL-USER -*-
;;; Copyright (c) 2021-2022 by Symbolics Pte. Ltd. All rights reserved.

(uiop:define-package #:num-utils-tests
(:use #:static-dispatch-cl
#:alexandria
#:anaphora
#:let-plus
#:fiveam
#:select

;; num-utils subpackages (alphabetical order)
#:num-utils.arithmetic
#:num-utils.chebyshev
#:num-utils.elementwise
#:num-utils.interval
#:num-utils.log-exp
#:num-utils.matrix
#:num-utils.matrix-shorthand
#:num-utils.num=
#:num-utils.polynomial
#:num-utils.quadrature
#:num-utils.rootfinding
#:num-utils.test-utilities
#:num-utils.utilities)
(:export #:run))
1 change: 1 addition & 0 deletions static-dispatch-tests/utilities.lisp
1 change: 1 addition & 0 deletions static-dispatch/arithmetic.lisp
1 change: 1 addition & 0 deletions static-dispatch/chebyshev.lisp
1 change: 1 addition & 0 deletions static-dispatch/elementwise.lisp
1 change: 1 addition & 0 deletions static-dispatch/extended-real.lisp
1 change: 1 addition & 0 deletions static-dispatch/interval.lisp
1 change: 1 addition & 0 deletions static-dispatch/log-exp.lisp
1 change: 1 addition & 0 deletions static-dispatch/matrix-shorthand.lisp
1 change: 1 addition & 0 deletions static-dispatch/matrix.lisp
1 change: 1 addition & 0 deletions static-dispatch/num=.lisp
Loading