[327bf8]: contrib / cl-simd / sse-array-defs.lisp Maximize Restore History

Download this file

sse-array-defs.lisp    74 lines (41 with data), 2.1 kB

 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
;;; -*- mode: Lisp; indent-tabs-mode: nil; -*-
;;;
;;; Copyright (c) 2010, Alexander Gavrilov (angavrilov@gmail.com)
;;;
;;; This file contains definitions for vectorized access
;;; to specialized lisp arrays.
;;;
(in-package #:SSE)
;;; Prefetch: AREF-PREFETCH-*, ROW-MAJOR-AREF-PREFETCH-*
(def-aref-intrinsic #:PREFETCH-T0 nil cpu-prefetch-t0 nil :ref-size 0)
(def-aref-intrinsic #:PREFETCH-T1 nil cpu-prefetch-t1 nil :ref-size 0)
(def-aref-intrinsic #:PREFETCH-T2 nil cpu-prefetch-t2 nil :ref-size 0)
(def-aref-intrinsic #:PREFETCH-NTA nil cpu-prefetch-nta nil :ref-size 0)
(def-aref-intrinsic #:CLFLUSH nil cpu-clflush nil :ref-size 1)
;;; Single-float
;; AREF-SS, ROW-MAJOR-AREF-SS
(def-aref-intrinsic #:SS float-sse-pack mem-ref-ss mem-set-ss :ref-size 4)
;; AREF-PS, ROW-MAJOR-AREF-PS
(def-aref-intrinsic #:PS float-sse-pack mem-ref-ps mem-set-ps)
;; AREF-APS, ROW-MAJOR-AREF-APS (requires alignment)
(def-aref-intrinsic #:APS float-sse-pack mem-ref-aps mem-set-aps)
;; AREF-SPS, ROW-MAJOR-AREF-SPS (requires alignment; no write cache)
(def-aref-intrinsic #:SPS float-sse-pack mem-ref-aps stream-ps)
;;; Double-float
;; AREF-SD, ROW-MAJOR-AREF-SD
(def-aref-intrinsic #:SD double-sse-pack mem-ref-sd mem-set-sd :ref-size 8)
;; AREF-PD, ROW-MAJOR-AREF-PD
(def-aref-intrinsic #:PD double-sse-pack mem-ref-pd mem-set-pd)
;; AREF-APD, ROW-MAJOR-AREF-APD (requires alignment)
(def-aref-intrinsic #:APD double-sse-pack mem-ref-apd mem-set-apd)
;; AREF-SPD, ROW-MAJOR-AREF-SPD (requires alignment; no write cache)
(def-aref-intrinsic #:SPD double-sse-pack mem-ref-apd stream-pd)
;;; Integer
;; AREF-SI64, ROW-MAJOR-AREF-SI64
(def-aref-intrinsic #:SI64 int-sse-pack mem-ref-si64 mem-set-si64 :ref-size 8)
;; AREF-PI, ROW-MAJOR-AREF-PI
(def-aref-intrinsic #:PI int-sse-pack mem-ref-pi mem-set-pi)
;; AREF-API, ROW-MAJOR-AREF-API (requires alignment)
(def-aref-intrinsic #:API int-sse-pack mem-ref-api mem-set-api)
;; AREF-SPI, ROW-MAJOR-AREF-SPI (requires alignment; no write cache)
(def-aref-intrinsic #:SPI int-sse-pack mem-ref-api stream-pi)