This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (sb-c:defknown prefetch ((member :nta :t0 :t1 :t2) | |
| sb-sys:system-area-pointer sb-vm:signed-word | |
| (member 2 4 8 16) | |
| fixnum) | |
| (values &optional) | |
| (sb-c:any sb-c:always-translatable) :overwrite-fndb-silently t) | |
| (sb-c:define-vop (prefetch) | |
| (:translate prefetch) | |
| (:policy :fast-safe) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; Fractional set cover solver with adahedge for the dual surrogate multiplers. | |
| (defpackage "FRACTIONAL-SET-COVER" | |
| (:use "CL")) | |
| (in-package "FRACTIONAL-SET-COVER") | |
| (deftype dvec () `(simple-array double-float 1)) | |
| (defstruct tour | |
| (index (error "index must be provided") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; Experiments in polymorphic function type instantiation with improve Fusion types. | |
| (defpackage #:fusion | |
| (:use #:cl)) | |
| (require "alexandria") | |
| (in-package #:fusion) | |
| (defconstant v 'v | |
| "Symbol for the implicitly constrained value in a constraint.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Asymptotically optimal entropy usage for reservoir sampling. | |
| """ | |
| import random | |
| from collections import namedtuple | |
| # Baseline implementation: split odd/even, then pick the last odd element specially, with p = 1/n | |
| def recursive_baseline(items): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2003, 2007 Matteo Frigo | |
| * Copyright (c) 2003, 2007 Massachusetts Institute of Technology | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining | |
| * a copy of this software and associated documentation files (the | |
| * "Software"), to deal in the Software without restriction, including | |
| * without limitation the rights to use, copy, modify, merge, publish, | |
| * distribute, sublicense, and/or sell copies of the Software, and to | |
| * permit persons to whom the Software is furnished to do so, subject to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _GNU_SOURCE | |
| #include "ck_ec.h" | |
| #include <ck_limits.h> | |
| #include <ck_stdbool.h> | |
| #include <linux/futex.h> | |
| #include <sys/syscall.h> | |
| #include <time.h> | |
| #include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <assert.h> | |
| #include <err.h> | |
| #include <inttypes.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <emmintrin.h> | |
| #include <tmmintrin.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _GNU_SOURCE | |
| #define RLOCK_SIGNAL_HANDLER | |
| #include "rlock.h" | |
| #include "rlock_process_status.h" | |
| #include <assert.h> | |
| #include <errno.h> | |
| #include <pthread.h> | |
| #include <signal.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % perf stat ./tsx_per_core | |
| Aborts: 73381 | |
| No reason: 57535 | |
| reason 0: 0 | |
| reason 1: 15833 | |
| reason 2: 15833 | |
| reason 3: 13 | |
| reason 4: 0 | |
| reason 5: 0 | |
| 81597398 68933303 85476712 72654716 76819140 72119787 77728188 74167801 75244800 72119632 75951739 72606078 74035109 70998737 89185152 58165171 86098994 83338241 88201758 81982602 77964219 77861602 75642915 79207346 73514808 79929374 74429694 71508632 0 0 0 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* frama-c test.c -wp -then -report */ | |
| struct foo { | |
| unsigned int x; | |
| double y; | |
| }; | |
| /*@ ghost int state_table[1UL << 30]; */ | |
| /*@ ghost unsigned long count; */ |