Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
b539c434
Commit
b539c434
authored
27 years ago
by
dtc
Browse files
Options
Downloads
Patches
Plain Diff
Add support for dumping and loading complex-float vectors.
parent
4943ef83
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
code/load.lisp
+14
-1
14 additions, 1 deletion
code/load.lisp
compiler/dump.lisp
+29
-1
29 additions, 1 deletion
compiler/dump.lisp
with
43 additions
and
2 deletions
code/load.lisp
+
14
−
1
View file @
b539c434
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/load.lisp,v 1.6
5
1997/11/0
1 22:58:16
dtc Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/load.lisp,v 1.6
6
1997/11/0
7 19:24:04
dtc Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -905,6 +905,19 @@
...
@@ -905,6 +905,19 @@
(
read-n-bytes
*fasl-file*
result
0
(
*
length
vm:word-bytes
2
))
(
read-n-bytes
*fasl-file*
result
0
(
*
length
vm:word-bytes
2
))
result
))
result
))
#+
complex-float
(
define-fop
(
fop-complex-single-float-vector
86
)
(
let*
((
length
(
read-arg
4
))
(
result
(
make-array
length
:element-type
'
(
complex
single-float
))))
(
read-n-bytes
*fasl-file*
result
0
(
*
length
vm:word-bytes
2
))
result
))
#+
complex-float
(
define-fop
(
fop-complex-double-float-vector
87
)
(
let*
((
length
(
read-arg
4
))
(
result
(
make-array
length
:element-type
'
(
complex
double-float
))))
(
read-n-bytes
*fasl-file*
result
0
(
*
length
vm:word-bytes
2
2
))
result
))
;;; FOP-INT-VECTOR -- Internal
;;; FOP-INT-VECTOR -- Internal
;;;
;;;
...
...
This diff is collapsed.
Click to expand it.
compiler/dump.lisp
+
29
−
1
View file @
b539c434
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/dump.lisp,v 1.6
5
1997/11/0
1 22:58:28
dtc Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/dump.lisp,v 1.6
6
1997/11/0
7 19:24:07
dtc Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -1312,6 +1312,14 @@
...
@@ -1312,6 +1312,14 @@
((
simple-array
double-float
(
*
))
((
simple-array
double-float
(
*
))
(
dump-double-float-vector
simple-version
file
)
(
dump-double-float-vector
simple-version
file
)
(
eq-save-object
x
file
))
(
eq-save-object
x
file
))
#+
complex-float
((
simple-array
(
complex
single-float
)
(
*
))
(
dump-complex-single-float-vector
simple-version
file
)
(
eq-save-object
x
file
))
#+
complex-float
((
simple-array
(
complex
double-float
)
(
*
))
(
dump-complex-double-float-vector
simple-version
file
)
(
eq-save-object
x
file
))
(
t
(
t
(
dump-i-vector
simple-version
file
)
(
dump-i-vector
simple-version
file
)
(
eq-save-object
x
file
)))))
(
eq-save-object
x
file
)))))
...
@@ -1434,6 +1442,26 @@
...
@@ -1434,6 +1442,26 @@
(
dump-data-maybe-byte-swapping
vec
(
*
length
vm:word-bytes
2
)
(
dump-data-maybe-byte-swapping
vec
(
*
length
vm:word-bytes
2
)
(
*
vm:word-bytes
2
)
file
)))
(
*
vm:word-bytes
2
)
file
)))
;;; DUMP-COMPLEX-SINGLE-FLOAT-VECTOR -- internal.
;;;
#+
complex-float
(
defun
dump-complex-single-float-vector
(
vec
file
)
(
let
((
length
(
length
vec
)))
(
dump-fop
'lisp::fop-complex-single-float-vector
file
)
(
dump-unsigned-32
length
file
)
(
dump-data-maybe-byte-swapping
vec
(
*
length
vm:word-bytes
2
)
vm:word-bytes
file
)))
;;; DUMP-COMPLEX-DOUBLE-FLOAT-VECTOR -- internal.
;;;
#+
complex-float
(
defun
dump-complex-double-float-vector
(
vec
file
)
(
let
((
length
(
length
vec
)))
(
dump-fop
'lisp::fop-complex-double-float-vector
file
)
(
dump-unsigned-32
length
file
)
(
dump-data-maybe-byte-swapping
vec
(
*
length
vm:word-bytes
2
2
)
(
*
vm:word-bytes
2
)
file
)))
;;; DUMP-DATA-BITS-MAYBE-BYTE-SWAPPING -- internal.
;;; DUMP-DATA-BITS-MAYBE-BYTE-SWAPPING -- internal.
;;;
;;;
;;; Dump BYTES of data from DATA-VECTOR (which must be some unboxed vector)
;;; Dump BYTES of data from DATA-VECTOR (which must be some unboxed vector)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment