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
| <table frame="none" id="conformance_basic_table"> | |
| <title>Conformance test results for the basic version.</title> | |
| <tgroup cols='4' align='right' colsep='1' rowsep='1'> | |
| <colspec align='left' /> | |
| <thead> | |
| <row> | |
| <entry>Item</entry> | |
| <entry>Reference DI</entry> | |
| <entry>Actual DI</entry> | |
| <entry>Difference</entry> |
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
| 496238dd984784c52f3a5dd6762fb711 acodsna.wav | |
| 378fbbd218516a8a17ba7ef1ab0170a9 arefsna.wav | |
| 498b16c46d9a9f2812a6b4393c26d3ba bcodtri.wav | |
| c02748a8c6665c4e24832a1fa9144765 breftri.wav | |
| 32018f15be1272bf70e4bf9c6dbbe585 ccodsax.wav | |
| 81c650d658f9354f75cf32bceea10788 crefsax.wav | |
| dc3acf34ae6a8b5087a9916bd687ce7a ecodsmg.wav | |
| 96538db2ef9c73c49eab483786109336 erefsmg.wav | |
| 6ad9c08fa978cbe2688880451b84d291 fcodsb1.wav | |
| b300060ccda896138d2decbae5310f9f fcodtr1.wav |
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
| static double | |
| fifth_root_pos_finite(double x) | |
| { | |
| static const double fifth_roots_pow2[9] = { // 2^((i-4)/5) | |
| 0.57434917749851754908974044155911542475223541259766, | |
| 0.65975395538644709958475687017198652029037475585937, | |
| 0.75785828325519899451023775327485054731369018554687, | |
| 0.87055056329612412469032278750091791152954101562500, | |
| 1.00000000000000000000000000000000000000000000000000, | |
| 1.14869835499703509817948088311823084950447082519530, |
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
| // Baseline version without prefetch | |
| static const LRMEntry * lrm_search_one_basic(const LRM * lrm, const U8 * ptr) | |
| { | |
| LRM_hash_t hash = lrm_hash8(ptr); | |
| // Jump-in: narrow down the search interval using the jump table | |
| LRM_hash_t ji = hash >> lrm->jumpInShift; | |
| S32 jump1 = lrm->jumpIn[ji]; | |
| S32 jump2 = lrm->jumpIn[ji + 1]; |
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
| ; input in Q0..Q7 | |
| ; swap antidiagonal elements within 2x2 blocks | |
| vtrn.16 q0, q1 | |
| vtrn.16 q2, q3 | |
| vtrn.16 q4, q5 | |
| vtrn.16 q6, q7 | |
| ; swap antidiagonal 2x2 blocks within 4x4 blocks | |
| vtrn.32 q0, q2 |
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
| We agreed beforehand that we don't care about tininess-before-or-after-rounding shenanigans. :) | |
| With that out of the way, the idea is to do something like this: | |
| fma(af, bf, cf): | |
| # All arithmetic done with RN | |
| ad = float_to_double(af) | |
| bd = float_to_double(bf) | |
| cd = float_to_double(cf) | |
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
| import random | |
| def random_bracket_sequence(n): | |
| """Generates a balanced sequence of n +1s and n -1s corresponding to correctly nested brackets.""" | |
| # "Generating binary trees at random", Atkinson & Sack, 1992 | |
| # Generate a randomly shuffled sequence of n +1s and n -1s | |
| # These are steps 1 and 2 of the algorithm in the paper | |
| seq = [-1, 1]*n | |
| random.shuffle(seq) |
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
| use std::str; | |
| // Store positions in packed (u32) form; this limits us to under 4GB of | |
| // payload but makes the data structures a bit more compact. | |
| struct PackedPos(u32); | |
| impl PackedPos { | |
| fn from(pos: usize) -> PackedPos { | |
| assert!(pos <= std::u32::MAX as usize); | |
| PackedPos(pos as u32) |
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 COUNT 5 ; 1=original test, 5=still in LSD, 50=not in LSD | |
| %define DEC_IN_REP | |
| ;%define USE_ZERO_IDIOM | |
| global main:function | |
| main: | |
| mov rbp, rsp | |
| mov eax, 3700000 | |
| .oloop: | |
| mov ecx, 1000 |
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
| #!/usr/bin/python3 | |
| # Per's code | |
| def sw_binary_divide2(n, d, num_bits): | |
| q = 0 | |
| r = n | |
| d2 = d << (num_bits - 1) | |
| for i in range(num_bits): | |
| q <<= 1 | |
| if r >= d2: |