-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathix.lisp
29 lines (22 loc) · 902 Bytes
/
ix.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;;; Copyright 2020 Google LLC
;;;
;;; Use of this source code is governed by an MIT-style
;;; license that can be found in the LICENSE file or at
;;; https://opensource.org/licenses/MIT.
;;; Arithmetic and boolean operations on the vector index type.
;;;
(defpackage #:ace.core.ix
(:import-from #:ace.core.vector #:index)
(:export
#:mod #:rem #:truncate #:floor #:ceiling
#:+ #:- #:* #:/ #:incf #:decf #:1+ #:1-
#:max #:min #:maxf #:minf
#:minusp #:zerop #:plusp #:oddp #:evenp
#:< #:> #:<= #:>= #:= #:/=
#:ash #:ashf
#:logior #:logxor #:logand #:logandc1 #:logandc2 #:logbitp
#:logiorf #:logxorf #:logandf #:logandc1f #:logandc2f))
(in-package #:ace.core.ix)
;;; Compile the operations without safety unless in the debug build.
#-dbg (cl:declaim (cl:optimize (cl:speed 3) (cl:safety 0) (cl:debug 0)))
(ace.core.fast-ops:define-typed-integer-math-functions index "")