Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 16 lines (13 sloc) 0.442 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
;;; -*- mode:lisp; indent-tabs-mode: nil; -*-

(in-package fast-compute)

(ffi:clines "#include <xmmintrin.h>")

(defun allow-denormalized-floats (&optional (enable-p t))
  (= 0
     (ffi:c-inline ((if enable-p 1 0)) (:int) :int
       "{ unsigned status = _mm_getcsr();
@(return) = (status & 0x8040);
if (#0)
status &= ~0x8040;
else
status |= 0x8040;
_mm_setcsr(status); }")))
Something went wrong with that request. Please try again.