Skip to content

Instantly share code, notes, and snippets.

View xigh's full-sized avatar

Philippe Anel xigh

View GitHub Profile
#include <immintrin.h>
#include <inttypes.h>
#include <stdio.h>
char *sprint_m256(__m256 v)
{
static char tmp[256];
float f[8];
_mm256_store_ps(f, v);
@xigh
xigh / pq.js
Last active May 29, 2020 12:07
Promise based Asynchronous Queue
export class PromiseQ {
constructor() {
this._queue = [];
}
async append(callback, param) {
const self = this;
const process = () => {
if (self._queue.length == 0) {
return;