This file contains 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
// This is a public domain implementation of SHA-512. | |
// Based on the SHA-256 implementation at https://github.com/983/SHA-256. | |
#include <stddef.h> | |
#include <stdint.h> | |
#define SHA512_HEX_SIZE (128 + 1) | |
#define SHA512_BYTES_SIZE 64 | |
typedef struct sha512 { |
This file contains 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
#ifndef __FAST_MATH__ | |
#define sin Sleef_sin_u10 | |
#define sinf Sleef_sinf_u10 | |
#define cos Sleef_cos_u10 | |
#define cosf Sleef_cosf_u10 | |
#define tan Sleef_tan_u10 | |
#define tanf Sleef_tanf_u10 | |
#define asin Sleef_asin_u10 | |
#define asinf Sleef_asinf_u10 | |
#define acos Sleef_acos_u10 |
This file contains 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 <stdio.h> | |
#include <stdint.h> | |
#include <math.h> | |
#include <x86intrin.h> | |
__m256i ftoh256h(__m256i l, __m256i h) { | |
__m256i rl = _mm256_shuffle_epi8(l, (__m256i) { 0x0d0c090805040100l, -1l, 0x0d0c090805040100l, -1l }); | |
rl = _mm256_permute4x64_epi64(rl, (0 << 0) | (2 << 2) | (1 << 4) | (3 << 6)); | |
__m256i rh = _mm256_shuffle_epi8(h, (__m256i) { 0x0d0c090805040100l, -1l, 0x0d0c090805040100l, -1l }); | |
rh = _mm256_permute4x64_epi64(rh, (1 << 0) | (3 << 2) | (0 << 4) | (2 << 6)); |
This file contains 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
<?php | |
header('Content-type: text/xml'); | |
/* | |
Based on https://gist.github.com/vsoch/4898025919365bf23b6f | |
The generated feed can be used for podcasting. | |
Runs from a directory containing files to provide an | |
RSS feed that contains the list and modification times for all the | |
files. | |
*/ |
This file contains 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
// Explanatory source code for the modified Payne Hanek reduction | |
// http://dx.doi.org/10.1109/TPDS.2019.2960333 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <mpfr.h> | |
typedef struct { double x, y; } double2; | |
double2 dd(double d) { double2 r = { d, 0 }; return r; } |
This file contains 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 "sleef.h" | |
#define INLINE inline | |
// Below is a part of helperavx2.h | |
#define VECTLENDP 4 | |
#define VECTLENSP 8 | |
typedef __m256i vmask; |
This file contains 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/bash | |
PATH=/bin:/usr/bin:$PATH | |
LASTDATE=INIT | |
while true; do | |
CURDATE=`date +'%D'` | |
if [ "$CURDATE" != "$LASTDATE" ] | |
then | |
for i in `cygpath $USERPROFILE`/AppData/Local/Packages/Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy/LocalState/Assets/*; do | |
if [ "`file $i | perl -pe 's|.* ([0-9]+x[0-9]+),.*|\1|'`" = 1920x1080 ] | |
then |