From: Akshay S. <ak...@us...> - 2012-07-06 09:49:42
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "matlisp". The branch, tensor has been updated via 2ea68617e269a162c2e722fe7b3314bec1c49a60 (commit) via 391e3cfc964a8038324bcbe654d45c763082986d (commit) via e3a4c5986e5e511c7ffbb1db7a96555bb24f31b7 (commit) via d5182e428a4c3a261f307a55f3f4bee5b23791d6 (commit) from 8bd064bd60e799c45ed248e17ea9dac42960a631 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2ea68617e269a162c2e722fe7b3314bec1c49a60 Author: Akshay Srinivasan <aks...@gm...> Date: Fri Jul 6 15:14:25 2012 +0530 Organised files better in directories. diff --git a/matlisp.asd b/matlisp.asd index 8ab5196..31cbe92 100644 --- a/matlisp.asd +++ b/matlisp.asd @@ -41,17 +41,13 @@ (asdf:defsystem matlisp-conditions :depends-on ("matlisp-packages") - :pathname #.(translate-logical-pathname "matlisp:srcdir;") - :components ((:module "conditions" - :pathname "src/" - :components ((:file "conditions"))))) + :pathname #.(translate-logical-pathname "matlisp:srcdir;src;") + :components ((:file "conditions"))) (asdf:defsystem matlisp-utilities - :pathname #.(translate-logical-pathname "matlisp:srcdir;") + :pathname #.(translate-logical-pathname "matlisp:srcdir;src;") :depends-on ("matlisp-packages" "matlisp-conditions") - :components ((:module "utilities" - :pathname "src/" - :components ((:file "utilities"))))) + :components ((:file "utilities"))) (asdf:defsystem lazy-loader :pathname #.(translate-logical-pathname "matlisp:lib;") @@ -71,29 +67,27 @@ ((:file "f77-mangling"))) (asdf:defsystem matlisp - :pathname #.(translate-logical-pathname "matlisp:srcdir;") + :pathname #.(translate-logical-pathname "matlisp:srcdir;src;") :depends-on (#:cffi "lazy-loader" "matlisp-packages" "matlisp-conditions" "matlisp-utilities" "fortran-names") :components ((:module "foreign-interface" - :pathname "src/" + :pathname "ffi" :components ((:file "ffi-cffi") - (:file "ffi-cffi-interpreter-specific") + (:file "ffi-cffi-implementation-specific") (:file "foreign-vector") )) - (:module "foreign-functions" - :pathname "src/" + (:module "foreign-core" + :pathname "foreign-core" :depends-on ("foreign-interface") :components ((:file "blas") (:file "lapack") (:file "dfftpack"))) (:module "matlisp-base" - :pathname "src/" - :depends-on ("foreign-functions") - :components ((:file "conditions") - (:file "standard-tensor" - :depends-on ("conditions")) + :depends-on ("foreign-core") + :pathname "base" + :components ((:file "standard-tensor") ;; (:file "loopy" :depends-on ("standard-tensor")) @@ -104,15 +98,15 @@ (:file "print" :depends-on ("standard-tensor")))) (:module "matlisp-classes" - :pathname "src/" + :pathname "classes" :depends-on ("matlisp-base") :components ((:file "real-tensor") (:file "complex-tensor") (:file "matrix" :depends-on ("real-tensor" "complex-tensor")))) (:module "matlisp-level-1" - :pathname "src/" - :depends-on ("matlisp-base" "matlisp-classes" "foreign-functions") + :pathname "level-1" + :depends-on ("matlisp-base" "matlisp-classes" "foreign-core") :components ((:file "tensor-maker") (:file "swap") (:file "dot") diff --git a/src/blas-helpers.lisp b/src/base/blas-helpers.lisp similarity index 100% rename from src/blas-helpers.lisp rename to src/base/blas-helpers.lisp diff --git a/src/loopy.lisp b/src/base/loopy.lisp similarity index 100% rename from src/loopy.lisp rename to src/base/loopy.lisp diff --git a/src/permutation.lisp b/src/base/permutation.lisp similarity index 100% rename from src/permutation.lisp rename to src/base/permutation.lisp diff --git a/src/print.lisp b/src/base/print.lisp similarity index 100% rename from src/print.lisp rename to src/base/print.lisp diff --git a/src/standard-tensor.lisp b/src/base/standard-tensor.lisp similarity index 100% rename from src/standard-tensor.lisp rename to src/base/standard-tensor.lisp diff --git a/src/complex-tensor.lisp b/src/classes/complex-tensor.lisp similarity index 100% rename from src/complex-tensor.lisp rename to src/classes/complex-tensor.lisp diff --git a/src/matrix.lisp b/src/classes/matrix.lisp similarity index 100% rename from src/matrix.lisp rename to src/classes/matrix.lisp diff --git a/src/real-tensor.lisp b/src/classes/real-tensor.lisp similarity index 100% rename from src/real-tensor.lisp rename to src/classes/real-tensor.lisp diff --git a/src/ffi/foreign-vector.lisp b/src/ffi/foreign-vector.lisp index 03ca115..ed036c3 100644 --- a/src/ffi/foreign-vector.lisp +++ b/src/ffi/foreign-vector.lisp @@ -1,4 +1,4 @@ -(in-packge :matlisp-ffi) +(in-package #:matlisp-ffi) (defstruct (foreign-vector (:conc-name fv-) diff --git a/src/foreign/blas.lisp b/src/foreign-core/blas.lisp similarity index 100% rename from src/foreign/blas.lisp rename to src/foreign-core/blas.lisp diff --git a/src/foreign/dfftpack.lisp b/src/foreign-core/dfftpack.lisp similarity index 100% rename from src/foreign/dfftpack.lisp rename to src/foreign-core/dfftpack.lisp diff --git a/src/foreign/lapack.lisp b/src/foreign-core/lapack.lisp similarity index 100% rename from src/foreign/lapack.lisp rename to src/foreign-core/lapack.lisp diff --git a/src/axpy.lisp b/src/level-1/axpy.lisp similarity index 100% rename from src/axpy.lisp rename to src/level-1/axpy.lisp diff --git a/src/copy.lisp b/src/level-1/copy.lisp similarity index 100% rename from src/copy.lisp rename to src/level-1/copy.lisp diff --git a/src/dot.lisp b/src/level-1/dot.lisp similarity index 100% rename from src/dot.lisp rename to src/level-1/dot.lisp diff --git a/src/realimag.lisp b/src/level-1/realimag.lisp similarity index 100% rename from src/realimag.lisp rename to src/level-1/realimag.lisp diff --git a/src/scal.lisp b/src/level-1/scal.lisp similarity index 100% rename from src/scal.lisp rename to src/level-1/scal.lisp diff --git a/src/swap.lisp b/src/level-1/swap.lisp similarity index 100% rename from src/swap.lisp rename to src/level-1/swap.lisp diff --git a/src/tensor-maker.lisp b/src/level-1/tensor-maker.lisp similarity index 100% rename from src/tensor-maker.lisp rename to src/level-1/tensor-maker.lisp commit 391e3cfc964a8038324bcbe654d45c763082986d Author: Akshay Srinivasan <aks...@gm...> Date: Fri Jul 6 12:55:09 2012 +0530 Moved untransitioned things to the "old" folder. Removed commit logs from some files. diff --git a/README.org b/README.org index 6e10d85..8bdcd0a 100644 --- a/README.org +++ b/README.org @@ -7,8 +7,7 @@ This is the development branch of Matlisp. * Added a specialisation agnostic macros {copy, scal} which generate functions by getting special method producing macros - produced by another macro {tensor-store-defs}. - * copy, scal, dot, swap work - * axpy works + * copy, scal, dot, swap, axpy work * tensor-{real, imag}part(~) work * sub-tensor~ works * print methods work @@ -18,17 +17,19 @@ This is the development branch of Matlisp. ** TODO : What remains ? (Help!) *** Functionality + * Make everything in src/old/ compatible with new datastrutures. + * Tensor contraction: Hard to do very quickly. + Might have to copy stuff into a contiguous array; like Femlisp. * BLAS level-2 and level-3: most importantly Matrix multiplication. * LAPACK: solving Linear equations, Eigenvalue decomposition. * DFFTPACK: computing FFTs * QUADPACK: Move from f2cl-ed version to the Fortran one. * MINPACK: Move from f2cl-ed version to the Fortran one. - * ODEPACK: Add abstraction for DLSODE, and DLSODAR. - * Tensor contraction: Hard to do very quickly. - Might have to copy stuff into a contiguous array; like Femlisp. + * ODEPACK: Add abstraction for DLSODE, and DLSODAR may others too. + *** Syntactic sugar * Add array slicing macros - + * Might have to add something to make it compatible with old Matlisp. *** Python-bridge (C)Python has far too many things, that we cannot even begin to hope to replicate. Burgled-batteries has a lot of things which could be useful in talking to CPython. diff --git a/matlisp.asd b/matlisp.asd index 27dfc0a..8ab5196 100644 --- a/matlisp.asd +++ b/matlisp.asd @@ -36,12 +36,19 @@ (asdf:defsystem matlisp-packages :depends-on (#:cffi) :pathname #.(translate-logical-pathname "matlisp:srcdir;") - :components + :components ((:file "packages"))) +(asdf:defsystem matlisp-conditions + :depends-on ("matlisp-packages") + :pathname #.(translate-logical-pathname "matlisp:srcdir;") + :components ((:module "conditions" + :pathname "src/" + :components ((:file "conditions"))))) + (asdf:defsystem matlisp-utilities :pathname #.(translate-logical-pathname "matlisp:srcdir;") - :depends-on ("matlisp-packages") + :depends-on ("matlisp-packages" "matlisp-conditions") :components ((:module "utilities" :pathname "src/" :components ((:file "utilities"))))) @@ -59,20 +66,21 @@ (asdf:defsystem fortran-names :pathname #.(translate-logical-pathname "matlisp:src;") - :depends-on ("matlisp-packages") + :depends-on ("matlisp-packages" "matlisp-conditions") :components ((:file "f77-mangling"))) (asdf:defsystem matlisp :pathname #.(translate-logical-pathname "matlisp:srcdir;") :depends-on (#:cffi "lazy-loader" - "matlisp-packages" "matlisp-utilities" - "fortran-names") + "matlisp-packages" "matlisp-conditions" + "matlisp-utilities" "fortran-names") :components ((:module "foreign-interface" :pathname "src/" :components ((:file "ffi-cffi") (:file "ffi-cffi-interpreter-specific") + (:file "foreign-vector") )) (:module "foreign-functions" :pathname "src/" @@ -113,11 +121,9 @@ (:file "scal" :depends-on ("copy" "tensor-maker")) (:file "realimag" - :depends-on ("copy")))) - (:module "matlisp-level-2" - :pathname "src/" - :depends-on ("matlisp-base" "matlisp-classes" "foreign-functions" "matlisp-level-1") - :components ((:file "axpy"))))) + :depends-on ("copy")) + (:file "axpy" + :depends-on ("copy")))))) ;; (defclass f2cl-cl-source-file (asdf:cl-source-file) diff --git a/packages.lisp b/packages.lisp index d202ce8..264a6da 100644 --- a/packages.lisp +++ b/packages.lisp @@ -25,136 +25,43 @@ ;;; ENHANCEMENTS, OR MODIFICATIONS. ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; -;;; $Id: packages.lisp,v 1.23 2011/01/25 18:36:56 rtoy Exp $ -;;; -;;; $Log: packages.lisp,v $ -;;; Revision 1.23 2011/01/25 18:36:56 rtoy -;;; Merge changes from automake-snapshot-2011-01-25-1327 to get the new -;;; automake build infrastructure. -;;; -;;; Revision 1.22.2.1 2011/01/25 18:16:10 rtoy -;;; config.lisp.in: -;;; o New file to setup some configuration. Mostly taken from -;;; packages.lisp. -;;; -;;; configure.ac: -;;; o Add mailing list and URL -;;; o Build config.lisp from config.lisp.in -;;; -;;; packages.lisp: -;;; o Move the non-package stuff to config.lisp.in. -;;; -;;; Revision 1.22 2009/08/19 16:01:34 rtoy -;;; Add support for interfacing to potrf and potrs. Submitted by Knut -;;; Gjerden. -;;; -;;; src/potrf.lisp: -;;; o New file for matlisp interface to potrf. Modeled after getrf. -;;; -;;; src/potrs.lisp: -;;; o New file for matlisp interface to potrs. Modeled after getrs. -;;; -;;; src/lapack.lisp: -;;; o Add Fortran interface to dpotrf, zpotrf, dpotrs, and zpotrs. -;;; -;;; matlisp.mk.in: -;;; o Add dpotrf.o, dpotf2.o dpotrs.o zpotrs.o to list of LAPACK files we -;;; need to compile. -;;; -;;; packages.lisp: -;;; o Export DPOTRS, ZPOTRS, DPOTRF, and ZPOTRF -;;; o Export POTRF! and POTRS!. -;;; -;;; start.lisp: -;;; o Don't use verbose output from mk:oos. -;;; -;;; system.dcl: -;;; o Add potrf and potrs to system. -;;; -;;; Revision 1.21 2004/05/20 21:43:00 rtoy -;;; Add some docstrings to the packages, remove some unused stuff. -;;; -;;; Revision 1.20 2004/02/20 17:34:31 rtoy -;;; Update to latest f2cl code, so -;;; o Fix defpackage stuff for f2cl -;;; o Update macros.l. -;;; -;;; Revision 1.19 2003/12/07 15:03:44 rtoy -;;; Add support for SBCL. I did not test if SBCL works, but CMUCL still -;;; works. -;;; -;;; From Robbie Sedgewick on matlisp-users, 2003-11-13. -;;; -;;; Revision 1.18 2003/10/25 17:01:49 rtoy -;;; o Remove the nicknames "MATRIX" and "M". -;;; o Minor indentation changes. -;;; -;;; Revision 1.17 2003/07/25 16:20:08 rtoy -;;; Use PCL:FIND-CLASS for CMUCL so all versions of CMUCL will still work. -;;; -;;; Revision 1.16 2003/05/31 03:41:43 rtoy -;;; Our REAL function was colliding with CL's REAL. Shadow this -;;; appropriately. -;;; -;;; Revision 1.15 2002/09/30 18:28:52 simsek -;;; o Added changes by N.Neuss for getrs functions -;;; -;;; Revision 1.14 2002/01/20 00:41:52 simsek -;;; o exporting some forgotton symbols from LAPACK -;;; -;;; Revision 1.13 2002/01/08 00:32:52 rtoy -;;; Add defpackage for the new MINPACK package. -;;; -;;; Revision 1.12 2001/10/25 21:52:57 rtoy -;;; Export QR, QR!, and GEQR!. -;;; -;;; Revision 1.11 2001/07/26 15:47:15 rtoy -;;; Updated version number to "Pre 2.0" since this isn't 1.0b anymore! -;;; -;;; Revision 1.10 2001/05/01 13:11:06 rtoy -;;; o Export I1MACH, R1MACH, D1MACH from the F2CL package. -;;; o Export POLYROOTS. -;;; -;;; Revision 1.9 2001/04/29 15:52:19 rtoy -;;; Add the external symbols from TOMS 715. -;;; -;;; Revision 1.8 2001/04/26 21:49:15 rtoy -;;; Add MATLISP-LIB package. -;;; -;;; Revision 1.7 2001/02/23 18:00:11 rtoy -;;; Add defpackages for FORTRAN-TO-LISP and QUADPACK for quadpack -;;; routines. Update MATLISP package accordingly. -;;; -;;; Revision 1.6 2000/10/04 23:54:47 simsek -;;; o Importing EXCL (EXT) for CMUCL (Allegro) in Matlisp-user package -;;; -;;; Revision 1.5 2000/10/04 22:49:52 simsek -;;; o Added matlisp-user package -;;; -;;; Revision 1.4 2000/10/04 15:40:46 simsek -;;; o Added unload-blas-&-lapack-binaries -;;; to symbols exported from matlisp -;;; -;;; Revision 1.3 2000/10/04 01:20:44 simsek -;;; o Moved version related code from system.dcl -;;; to here. This code should be the first bit of code loaded -;;; but only after the system is defined (furthermore, in this -;;; way we avoid interning symbols in packages other than the -;;; matlisp package -;;; -;;; Revision 1.2 2000/07/11 02:03:51 simsek -;;; o Added support for Allegro CL -;;; -;;; Revision 1.1 2000/06/19 22:19:33 rtoy -;;; Initial revision. -;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;;; Define the packages and symbols for Matlisp. -(defpackage "UTILITIES" +(defpackage "MATLISP-CONDITIONS" (:use #:common-lisp) + (:export + ;;<conditon {accessors*}> + ;;Generic errors + #:generic-error #:message + #:invalid-type #:given #:expected + #:invalid-value #:given #:expected + #:unknown-token #:token + #:coercion-error #:from #:to + #:out-of-bounds-error #:requested #:bound + #:non-uniform-bounds-error #:assumed #:found + ;;Permutation conditions + #:permutation #:permutation + #:permutation-invalid-error + #:permutation-permute-error #:seq-len #:group-rank + ;;Tensor conditions + #:tensor-error #:tensor + #:tensor-store-index-out-of-bounds #:index #:store-size + #:tensor-insufficient-store #:store-size #:max-idx + #:tensor-not-matrix #:rank + #:tensor-not-vector #:rank + #:tensor-index-out-of-bounds #:argument #:index #:dimension + #:tensor-index-rank-mismatch #:index-rank #:rank + #:tensor-invalid-head-value #:head + #:tensor-invalid-dimension-value #:argument #:dimension + #:tensor-invalid-stride-value #:argument #:stride + #:tensor-cannot-find-sub-class #:tensor-class + #:tensor-cannot-find-optimization #:tensor-class + #:tensor-dimension-mismatch +)) + +;;foreign-vector stuff must go to ffi-... +(defpackage "MATLISP-UTILITIES" + (:use #:common-lisp #:matlisp-conditions) (:export #:ensure-list #:zip #:zip-eq #:cut-cons-chain! @@ -170,29 +77,28 @@ #:macrofy ;; #:inlining #:definline - #:with-optimization #:quickly #:very-quickly #:slowly #:quickly-if - ;;Structure-specific - #:foreign-vector #:make-foreign-vector #:foreign-vector-p - #:fv-ref #:fv-pointer #:fv-size #:fv-type)) + #:with-optimization #:quickly #:very-quickly #:slowly #:quickly-if)) -(defpackage "FORTRAN-FFI-ACCESSORS" - (:nicknames #:ffi) - (:use #:common-lisp #:cffi #:utilities) +(defpackage "MATLISP-FFI" + (:use #:common-lisp #:cffi #:matlisp-utilities #:matlisp-conditions) ;; TODO: Check if this is implementation-agnostic. ;; #+:cmu (:use :common-lisp :c-call :cffi :utilities) ;; #+:sbcl (:use :common-lisp :cffi :utilities) - + ;; Works with ccl. ;; #+:allegro (:use :common-lisp :cffi :utilities) ;; #+(not (or sbcl cmu allegro)) (:use :common-lisp :cffi :utilities) (:export - ;; interface functions + ;;Foreign-pointer enclosing structure. + #:foreign-vector #:make-foreign-vector #:foreign-vector-p + #:fv-ref #:fv-pointer #:fv-size #:fv-type + ;;Interface functions #:def-fortran-routine #:with-vector-data-addresses ) (:documentation "Fortran foreign function interface")) -(defpackage "BLAS" - (:use #:common-lisp #:ffi) +(defpackage "MATLISP-BLAS" + (:use #:common-lisp #:matlisp-ffi) (:export ;;BLAS Level 1 ;;------------ @@ -216,8 +122,8 @@ #:zgemm #:ztrmm #:ztrsm #:zherk #:zher2k) (:documentation "BLAS routines")) -(defpackage "LAPACK" - (:use #:common-lisp #:ffi) +(defpackage "MATLISP-LAPACK" + (:use #:common-lisp #:matlisp-ffi) (:export #:dgesv #:dgeev #:dgetrf #:dgetrs #:dgesvd #:zgesv #:zgeev #:zgetrf #:zgetrs #:zgesvd @@ -227,15 +133,16 @@ #:dgelsy) (:documentation "LAPACK routines")) -(defpackage "DFFTPACK" - (:use #:common-lisp #:fortran-ffi-accessors) +(defpackage "MATLISP-DFFTPACK" + (:use #:common-lisp #:matlisp-ffi) (:export #:zffti #:zfftf #:zfftb #:zffti #:zfftf #:zfftb) (:documentation "FFT routines")) (defpackage "MATLISP" - (:use #:common-lisp #:fortran-ffi-accessors #:blas #:lapack #:dfftpack #:utilities) - (:export #:integer4-type #:integer4-array #:allocate-integer4-store - #:index-type #:index-array #:allocate-index-store #:make-index-store + (:use #:common-lisp + #:matlisp-conditions #:matlisp-utilities #:matlisp-ffi + #:matlisp-blas #:matlisp-lapack #:matlisp-dfftpack) + (:export #:index-type #:index-array #:allocate-index-store #:make-index-store ;;Standard-tensor #:standard-tensor #:rank #:dimensions #:number-of-elements diff --git a/src/axpy.lisp b/src/axpy.lisp index bffe87a..35fa404 100644 --- a/src/axpy.lisp +++ b/src/axpy.lisp @@ -25,54 +25,8 @@ ;;; ENHANCEMENTS, OR MODIFICATIONS. ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; -;;; Originally written by Raymond Toy -;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; -;;; $Id: axpy.lisp,v 1.8 2011/01/25 18:36:56 rtoy Exp $ -;;; -;;; $Log: axpy.lisp,v $ -;;; Revision 1.8 2011/01/25 18:36:56 rtoy -;;; Merge changes from automake-snapshot-2011-01-25-1327 to get the new -;;; automake build infrastructure. -;;; -;;; Revision 1.7.2.1 2011/01/25 18:16:53 rtoy -;;; Use cl:real instead of real. -;;; -;;; Revision 1.7 2004/05/24 16:34:22 rtoy -;;; More SBCL support from Robert Sedgewick. The previous SBCL support -;;; was incomplete. -;;; -;;; Revision 1.6 2003/02/14 05:42:11 rtoy -;;; Undo previous change. We really need the 1x1-complex-array for -;;; Allegro because we don't (currently) pass in complex double-floats as -;;; an array. (Not needed for CMUCL which handles this correctly.) -;;; -;;; Revision 1.4 2000/07/11 18:02:03 simsek -;;; o Added credits -;;; -;;; Revision 1.3 2000/07/11 02:11:56 simsek -;;; o Added support for Allegro CL -;;; -;;; Revision 1.2 2000/05/08 17:19:18 rtoy -;;; Changes to the STANDARD-MATRIX class: -;;; o The slots N, M, and NXM have changed names. -;;; o The accessors of these slots have changed: -;;; NROWS, NCOLS, NUMBER-OF-ELEMENTS -;;; The old names aren't available anymore. -;;; o The initargs of these slots have changed: -;;; :nrows, :ncols, :nels -;;; -;;; Revision 1.1 2000/04/14 00:11:12 simsek -;;; o This file is adapted from obsolete files 'matrix-float.lisp' -;;; 'matrix-complex.lisp' and 'matrix-extra.lisp' -;;; o Initial revision. -;;; -;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(in-package :matlisp) +(in-package #:matlisp) (defmacro generate-typed-axpy! (func (tensor-class blas-func)) ;;Be very careful when using functions generated by this macro. diff --git a/src/blas-helpers.lisp b/src/blas-helpers.lisp index 04209bb..ce40b7f 100644 --- a/src/blas-helpers.lisp +++ b/src/blas-helpers.lisp @@ -1,4 +1,4 @@ -(in-package :matlisp) +(in-package #:matlisp) ;;Check dimensions of the tensors before passing the argument here! (defun blas-copyable-p (ten-a ten-b) diff --git a/src/complex-tensor.lisp b/src/complex-tensor.lisp index 967ad68..c876f90 100644 --- a/src/complex-tensor.lisp +++ b/src/complex-tensor.lisp @@ -1,4 +1,4 @@ -(in-package :matlisp) +(in-package #:matlisp) (deftype complex-base-type () "The type of the elements stored in a COMPLEX-MATRIX" diff --git a/src/conditions.lisp b/src/conditions.lisp index 842624e..9864362 100644 --- a/src/conditions.lisp +++ b/src/conditions.lisp @@ -1,17 +1,5 @@ ;;; -*- Mode: lisp; Syntax: ansi-common-lisp; Package: :matlisp; Base: 10 -*- -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; -;;; $Id: conditions.lisp,v 1.1 2003/06/01 15:21:41 rtoy Exp $ -;;; -;;; $Log: conditions.lisp,v $ -;;; Revision 1.1 2003/06/01 15:21:41 rtoy -;;; Some conditions for matlisp matrix errors. -;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;;; Error conditions for matlisp - -(in-package :matlisp) +(in-package #:matlisp-conditions) (defmacro defcondition (name (&rest parent-types) (&rest slot-specs) &body options) "Like define-condition except that you can define @@ -82,7 +70,27 @@ (:method print-object ((c out-of-bounds-error) stream) (format stream "The bounds are not uniform, assumed bound : ~a, now found to be : ~a.~%" (assumed c) (found c)) (call-next-method))) - + +;;Permutation conditions-----------------------------------------;; +(define-condition permutation-error (error) + ((permutation :reader permutation : |