Skip to content

Instantly share code, notes, and snippets.

View sgolestane's full-sized avatar

Sid Golestane sgolestane

View GitHub Profile
Column 1,Column 2,Column 3,Column 4
A,1,x,
B,2,x,
C,3,y,
D,4,y,
E,4.9,z,Something big with some special characters { } !#$. Free text! Woo!
@sgolestane
sgolestane / test_mkl_sparse_spmm.c
Created March 15, 2018 17:13
mkl_sparse_spmm Internal memory allocation failed.
/*
source /opt/intel/bin/compilervars.sh -arch intel64 -platform mac
DYLD_LIBRARY_PATH="/opt/intel/mkl/lib"
gcc -fsanitize=address -lmkl_rt -lm -o test_mkl_sparse_spmm test_mkl_sparse_spmm.c
A:
|------------------------------------------------------------------------------------------|
| 0 | | | | | 5 | | | | | 10 | | | | | 15 | 16 |
@sgolestane
sgolestane / gist:4687319
Created January 31, 2013 22:38
Convert a hex digit to an byte value without the need for branchful code
byte b = (byte)((c & 0x1f) + ((c >> 6) * 0x19) - 0x10);
#!/bin/bash
#
# Links files in this directory to the current users home directory.
#
# If the link already exists the file will be skipped unless the -f flag is given.
# BSD's realpath does not have the -f flag
real_path () {
_=`pwd`
[ -d $DIR ] && DIR=$1