Skip to content

Instantly share code, notes, and snippets.

View zpzim's full-sized avatar

Zach Zimmerman zpzim

View GitHub Profile
@zpzim
zpzim / ssecheck.cpp
Created February 13, 2022 04:30 — forked from hi2p-perim/ssecheck.cpp
Check SSE/AVX instruction support.
/*
Check SSE/AVX support.
This application can detect the instruction support of
SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4a, SSE5, and AVX.
*/
#include <iostream>
#ifdef _MSC_VER
#include <intrin.h>
#endif
@zpzim
zpzim / mp_fast.py
Created September 23, 2019 19:18
My attempt at fast MP python code (only does self joins and probably could be better)
import numpy as np
import math
import numba
def get_precomputes(T, m):
prefix_sum = np.zeros((len(T),))
prefix_sum_sq = np.zeros((len(T),))
n = len(T) - m + 1;
norms = np.zeros((n,))
means = np.zeros((n,))
...
[ 33%] Linking CXX executable ../bin/polynomial
*** Error in `/home/zach/khiva/build/bin/polynomial': munmap_chunk(): invalid pointer: 0x000000000177a760 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f9e2bbad7e5]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x1a8)[0x7f9e2bbba698]
/home/zach/khiva/build/bin/polynomial[0x404aa9]
/home/zach/khiva/build/bin/polynomial[0x43f8dd]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x7f)[0x7f9e2bb567bf]
/home/zach/khiva/build/bin/polynomial[0x405269]