;;;; Name: edge-table-storage.lisp
;;;; Purpose: Store precompiled edge table for reversi
;;;; Programer: Kevin Rosenberg
;;;; Name: edge-table-storage.lisp
;;;; Purpose: Store precompiled edge table for reversi
;;;; Programer: Kevin Rosenberg
- :directory (pathname-directory *load-truename*)
- :host (pathname-host *load-truename*)
- :device (pathname-device *load-truename*)
- :name "edge-table"
- :type "dat"))))
+ :directory (pathname-directory *load-truename*)
+ :host (pathname-host *load-truename*)
+ :device (pathname-device *load-truename*)
+ :name "edge-table"
+ :type "dat"))))
(defun store-edge-table (et &optional (path *et-path*))
(declare (type edge-table et))
(with-open-file (stream path :direction :output
(defun store-edge-table (et &optional (path *et-path*))
(declare (type edge-table et))
(with-open-file (stream path :direction :output
- (let* ((length (read stream))
- (et (make-array length :element-type 'fixnum)))
- (declare (type (simple-array fixnum (*)) et))
- (dotimes (i length)
- (declare (fixnum i))
- (setf (aref et i) (read stream)))
- et))))
-
+ (let* ((length (read stream))
+ (et (make-array length :element-type 'fixnum)))
+ (declare (type (simple-array fixnum (*)) et))
+ (dotimes (i length)
+ (declare (fixnum i))
+ (setf (aref et i) (read stream)))
+ et))))
+
(unless (probe-file *et-path*)
(format *trace-output* ";; Recompiling edge-table, this make take several minutes")
(store-edge-table (make-edge-table)))
(unless (probe-file *et-path*)
(format *trace-output* ";; Recompiling edge-table, this make take several minutes")
(store-edge-table (make-edge-table)))