Commit 4c5d0eb5 authored by Carlos Ungil's avatar Carlos Ungil

missing example image removed, floating traps disabled for Linux/SBCL compatibility

parent 04ebef9d
......@@ -6,7 +6,8 @@
(ql:quickload :drakma)
;; if the following files do not exist they will be retrieved automatically (but not stored)
;; if the data files do not exist in /tmp/ they will be retrieved automatically (but not stored)
;; use the following shell commands to download the files:
cd /tmp/
......@@ -22,7 +23,7 @@ wget
(defun file-as-bytes (path)
(with-open-file (s path :element-type 'unsigned-byte)
(let ((buf (make-array (file-length s) :element-type 'unsigned-byte)))
(let ((buf (make-array (file-length s) :element-type '(unsigned-byte 8))))
(read-sequence buf s)
......@@ -70,7 +71,6 @@ wget
(defvar *test-images* '(""
(in-package :mxnet.predict.ffi)
;; to regenerate the autowrap definitions, delete or rename the .spec files
;; requires LLVM/Clang and c2ffi
;; ffi/c_predict_api.h and ffi/c_api.h come from include/mxnet in the mxnet sources
(cffi:load-foreign-library "~/mxnet/lib/")
(autowrap:c-include '(mxnet-predict ffi "c_predict_api.h") :spec-path '(mxnet-predict ffi))
(cl:let ((library (cl:merge-pathnames "mxnet/lib/" (cl:user-homedir-pathname))))
#+(and linux sbcl) (sb-int:with-float-traps-masked (:invalid :overflow :divide-by-zero)
(cffi:load-foreign-library library))
#-(and linux sbcl) (cffi:load-foreign-library library)
(cl:format cl:t "~%~% Foreign library ~A loaded~%~%~%" library))
(cl:in-package :mxnet.predict.ffi)
(autowrap:c-include '(mxnet-predict ffi "c_predict_api.h") :spec-path '(mxnet-predict ffi))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment