Skip to content

Instantly share code, notes, and snippets.

@mrzv
mrzv / Makefile
Last active November 5, 2019 21:02
factory-example
example: example.cpp
${CXX} $< -o $@ -std=c++11
@mrzv
mrzv / Makefile
Last active May 13, 2019 22:48
Filtration bug
CPPFLAGS=-DCGAL_USE_GMP -DCGAL_USE_MPFR
LIBS=-lmpfr -lgmp -lCGAL -lz
compute-filtration: compute-filtration.cpp cnpy.cpp
g++ ${CPPFLAGS} -O3 -o $@ $^ -std=c++11 ${LIBS}
--- src/include/mpiimpl-orig.h 2016-08-19 14:01:13.000000000 -0700
+++ src/include/mpiimpl.h 2016-08-19 14:01:35.000000000 -0700
@@ -1528,7 +1528,7 @@
#ifdef MPID_DEV_REQUEST_DECL
MPID_DEV_REQUEST_DECL
#endif
-} MPID_Request ATTRIBUTE((__aligned__(32)));
+} ATTRIBUTE((__aligned__(32))) MPID_Request;
extern MPIU_Object_alloc_t MPID_Request_mem;
@mrzv
mrzv / # mpich - 2016-08-16_21-39-35.txt
Created August 17, 2016 15:33
mpich on Mac OS X 10.11.6 - Homebrew build logs
Homebrew build logs for mpich on Mac OS X 10.11.6
Build date: 2016-08-16 21:39:35
@mrzv
mrzv / gist:8513889
Created January 20, 2014 02:20
Nimrod segfault
import tables
type
TMyTable[T] = TTable[int,T]
proc `[]=`[T](m: TMyTable[T], k: int, v: T) =
tables.`[]=`[int,T](m,k,v)
var m: TMyTable[int] = initTable[int,int]()
m[2] = 3
@mrzv
mrzv / gist:8476229
Last active January 3, 2016 14:29
nimrod modules error
# --- serialize.nim ---
import streams
#import archive # works if I uncomment this line
proc `<<`*[TA,T] (a: TA, x: T): TA
proc `>>`*[TA,T] (a: TA, x: var T): TA
proc save*[TA,T](a: TA, x: seq[T]): TA =
discard a << len(x)
for v in x: