;;; Lisplab, type.lisp ;;; Type definition for double float arrays and vector index ;;; Note, most other files depends on this one ! ;;; ;;; Copyright (C) 2010 Joern Inge Vestgaarden ;;; ;;; This program is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 2 of the License, or ;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License along ;;; with this program; if not, write to the Free Software Foundation, Inc., ;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ;;; TODO: change name of this to something about blas store ;;; ;;; This file contains manipulations of simple double-float arrays ;;; and should be called by the spesialized matrix methods. ;;; The purpose of this layer is that it can be used by ;;; many classes such as matrix-base-dge and matrix-base-ddi, etc. ;;; ;;; The content of this file must be highly optimized ;;; and should not depend anything exept Common Lisp itself. (in-package :lisplab) ;;; Things that are common both for real and complex stores (deftype type-blas-store () '(simple-array double-float (*))) #+(and :sbcl :x86) (deftype type-blas-idx () '(MOD #x1FFFFFFF)) #+(and :sbcl :x86) (defconstant max-type-blas-idx #x1FFFFFFF) #+(and :sbcl :x86-64) (deftype type-blas-idx () '(MOD #xFFFFFFFFFFFFFFD)) #+(and :sbcl :x86-64) (defconstant max-type-blas-idx #xFFFFFFFFFFFFFFD) #-:sbcl (deftype type-blas-idx () 'fixnum) #-:sbcl (deconstant max-type-blas-idx most-positive-fixnum) (deftype type-idx-store () '(simple-array type-blas-idx (*))) (deftype type-ub1-store () '(simple-array (unsigned-byte 1) (*))) (deftype type-ub8-store () '(simple-array (unsigned-byte 8) (*))) (deftype type-ub16-store () '(simple-array (unsigned-byte 16) (*))) (deftype type-ub32-store () '(simple-array (unsigned-byte 32) (*))) (deftype type-sb8-store () '(simple-array (signed-byte 8) (*))) (deftype type-sb16-store () '(simple-array (signed-byte 16) (*))) (deftype type-sb32-store () '(simple-array (signed-byte 32) (*)))