matrix-transpose-copy.lisp 9.74 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
;; Regression test MATRIX-TRANSPOSE-COPY for GSLL, automatically generated

(in-package :gsl)

(LISP-UNIT:DEFINE-TEST MATRIX-TRANSPOSE-COPY
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((-34.5 -8.93 49.27)
                             (8.24 34.12 -13.49)
                             (3.29 -6.15 32.5)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
12 13 14 15 16 17 18 19
                         (LET ((M1
                                (MAKE-MARRAY 'SINGLE-FLOAT :INITIAL-CONTENTS
                                             '((-34.5 8.24 3.29)
                                               (-8.93 34.12 -6.15)
                                               (49.27 -13.49 32.5))))
                               (M2
                                (MAKE-MARRAY 'SINGLE-FLOAT :DIMENSIONS '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
20 21 22 23 24 25
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((-34.5d0 -8.93d0 49.27d0)
                             (8.24d0 34.12d0 -13.49d0)
                             (3.29d0 -6.15d0 32.5d0)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
26 27 28 29 30 31 32 33
                         (LET ((M1
                                (MAKE-MARRAY 'DOUBLE-FLOAT :INITIAL-CONTENTS
                                             '((-34.5d0 8.24d0 3.29d0)
                                               (-8.93d0 34.12d0 -6.15d0)
                                               (49.27d0 -13.49d0 32.5d0))))
                               (M2
                                (MAKE-MARRAY 'DOUBLE-FLOAT :DIMENSIONS '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
34 35 36 37 38 39 40
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((#C(-34.5 8.24) #C(-8.93 34.12) #C(49.27 -13.49))
                             (#C(3.29 -8.93) #C(-6.15 49.27) #C(32.5 42.73))
                             (#C(34.12 -6.15) #C(-13.49 32.5)
                              #C(-17.24 43.31))))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
41 42 43 44 45 46 47 48 49 50 51 52 53
                         (LET ((M1
                                (MAKE-MARRAY '(COMPLEX SINGLE-FLOAT)
                                             :INITIAL-CONTENTS
                                             '((-34.5 8.24 3.29 -8.93 34.12
                                                -6.15)
                                               (-8.93 34.12 -6.15 49.27 -13.49
                                                32.5)
                                               (49.27 -13.49 32.5 42.73 -17.24
                                                43.31))))
                               (M2
                                (MAKE-MARRAY '(COMPLEX SINGLE-FLOAT)
                                             :DIMENSIONS '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
54 55 56 57 58 59 60 61 62
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((#C(-34.5d0 8.24d0) #C(-8.93d0 34.12d0)
                              #C(49.27d0 -13.49d0))
                             (#C(3.29d0 -8.93d0) #C(-6.15d0 49.27d0)
                              #C(32.5d0 42.73d0))
                             (#C(34.12d0 -6.15d0) #C(-13.49d0 32.5d0)
                              #C(-17.24d0 43.31d0))))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
63 64 65 66 67 68 69 70 71 72 73 74 75
                         (LET ((M1
                                (MAKE-MARRAY '(COMPLEX DOUBLE-FLOAT)
                                             :INITIAL-CONTENTS
                                             '((-34.5d0 8.24d0 3.29d0 -8.93d0
                                                34.12d0 -6.15d0)
                                               (-8.93d0 34.12d0 -6.15d0 49.27d0
                                                -13.49d0 32.5d0)
                                               (49.27d0 -13.49d0 32.5d0 42.73d0
                                                -17.24d0 43.31d0))))
                               (M2
                                (MAKE-MARRAY '(COMPLEX DOUBLE-FLOAT)
                                             :DIMENSIONS '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
76 77 78
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-64 -91 73) (-68 52 -5) (71 -10 123)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
79 80 81 82 83 84 85 86
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 8) :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123))))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 8) :DIMENSIONS
                                             '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
87 88 89
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((67 116 161) (44 163 215) (189 140 98)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
90 91 92 93 94 95 96 97 98
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 8)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98))))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 8) :DIMENSIONS
                                             '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
99 100 101
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-64 -91 73) (-68 52 -5) (71 -10 123)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
102 103 104 105 106 107 108 109 110
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 16)
                                             :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123))))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 16) :DIMENSIONS
                                             '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
111 112 113
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((67 116 161) (44 163 215) (189 140 98)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
114 115 116 117 118 119 120 121 122
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 16)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98))))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 16) :DIMENSIONS
                                             '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
123 124 125
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-64 -91 73) (-68 52 -5) (71 -10 123)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
126 127 128 129 130 131 132 133 134
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 32)
                                             :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123))))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 32) :DIMENSIONS
                                             '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
135 136 137
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((67 116 161) (44 163 215) (189 140 98)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
138 139 140 141 142 143 144 145 146
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 32)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98))))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 32) :DIMENSIONS
                                             '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
147
		       #+int64
148 149 150
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-64 -91 73) (-68 52 -5) (71 -10 123)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
151 152 153 154 155 156 157 158 159
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 64)
                                             :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123))))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 64) :DIMENSIONS
                                             '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1)))))
160
		       #+int64
161 162 163
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((67 116 161) (44 163 215) (189 140 98)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
164 165 166 167 168 169 170 171 172
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 64)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98))))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 64) :DIMENSIONS
                                             '(3 3))))
                           (CL-ARRAY (MATRIX-TRANSPOSE-COPY M2 M1))))))
173