| 1 |
;;; -*- mode: Lisp; indent-tabs-mode: nil; -*- |
| 2 |
;;; |
| 3 |
;;; Copyright (c) 2010, Alexander Gavrilov ([email protected]) |
| 4 |
;;; |
| 5 |
;;; This file contains definitions for vectorized access |
| 6 |
;;; to specialized lisp arrays. |
| 7 |
;;; |
| 8 |
|
| 9 |
(in-package #:SSE) |
| 10 |
|
| 11 |
;;; Prefetch: AREF-PREFETCH-*, ROW-MAJOR-AREF-PREFETCH-* |
| 12 |
|
| 13 |
(def-aref-intrinsic #:PREFETCH-T0 nil cpu-prefetch-t0 nil :ref-size 0) |
| 14 |
(def-aref-intrinsic #:PREFETCH-T1 nil cpu-prefetch-t1 nil :ref-size 0) |
| 15 |
(def-aref-intrinsic #:PREFETCH-T2 nil cpu-prefetch-t2 nil :ref-size 0) |
| 16 |
(def-aref-intrinsic #:PREFETCH-NTA nil cpu-prefetch-nta nil :ref-size 0) |
| 17 |
|
| 18 |
(def-aref-intrinsic #:CLFLUSH nil cpu-clflush nil :ref-size 1) |
| 19 |
|
| 20 |
;;; Single-float |
| 21 |
|
| 22 |
;; AREF-SS, ROW-MAJOR-AREF-SS |
| 23 |
|
| 24 |
(def-aref-intrinsic #:SS float-sse-pack mem-ref-ss mem-set-ss :ref-size 4) |
| 25 |
|
| 26 |
;; AREF-PS, ROW-MAJOR-AREF-PS |
| 27 |
|
| 28 |
(def-aref-intrinsic #:PS float-sse-pack mem-ref-ps mem-set-ps) |
| 29 |
|
| 30 |
;; AREF-APS, ROW-MAJOR-AREF-APS (requires alignment) |
| 31 |
|
| 32 |
(def-aref-intrinsic #:APS float-sse-pack mem-ref-aps mem-set-aps) |
| 33 |
|
| 34 |
;; AREF-SPS, ROW-MAJOR-AREF-SPS (requires alignment; no write cache) |
| 35 |
|
| 36 |
(def-aref-intrinsic #:SPS float-sse-pack mem-ref-aps stream-ps) |
| 37 |
|
| 38 |
;;; Double-float |
| 39 |
|
| 40 |
;; AREF-SD, ROW-MAJOR-AREF-SD |
| 41 |
|
| 42 |
(def-aref-intrinsic #:SD double-sse-pack mem-ref-sd mem-set-sd :ref-size 8) |
| 43 |
|
| 44 |
;; AREF-PD, ROW-MAJOR-AREF-PD |
| 45 |
|
| 46 |
(def-aref-intrinsic #:PD double-sse-pack mem-ref-pd mem-set-pd) |
| 47 |
|
| 48 |
;; AREF-APD, ROW-MAJOR-AREF-APD (requires alignment) |
| 49 |
|
| 50 |
(def-aref-intrinsic #:APD double-sse-pack mem-ref-apd mem-set-apd) |
| 51 |
|
| 52 |
;; AREF-SPD, ROW-MAJOR-AREF-SPD (requires alignment; no write cache) |
| 53 |
|
| 54 |
(def-aref-intrinsic #:SPD double-sse-pack mem-ref-apd stream-pd) |
| 55 |
|
| 56 |
;;; Integer |
| 57 |
|
| 58 |
;; AREF-SI64, ROW-MAJOR-AREF-SI64 |
| 59 |
|
| 60 |
(def-aref-intrinsic #:SI64 int-sse-pack mem-ref-si64 mem-set-si64 :ref-size 8) |
| 61 |
|
| 62 |
;; AREF-PI, ROW-MAJOR-AREF-PI |
| 63 |
|
| 64 |
(def-aref-intrinsic #:PI int-sse-pack mem-ref-pi mem-set-pi) |
| 65 |
|
| 66 |
;; AREF-API, ROW-MAJOR-AREF-API (requires alignment) |
| 67 |
|
| 68 |
(def-aref-intrinsic #:API int-sse-pack mem-ref-api mem-set-api) |
| 69 |
|
| 70 |
;; AREF-SPI, ROW-MAJOR-AREF-SPI (requires alignment; no write cache) |
| 71 |
|
| 72 |
(def-aref-intrinsic #:SPI int-sse-pack mem-ref-api stream-pi) |
| 73 |
|