Skip to content

Instantly share code, notes, and snippets.

View icpz's full-sized avatar
👻

Digital Pencil icpz

👻
View GitHub Profile
@roastduck
roastduck / hook.cpp
Created March 25, 2019 12:34
cuDNN logger using LD_PRELOAD
// compile: g++ -O2 -g -Wall -fPIC -shared hook.cpp -o hook.so -ldl -L/usr/local/cuda-10.0/extras/cudnn-7.4.2/lib64 -lcudnn -lcublas -lcudart
#include <cassert>
#include <mutex>
#include <string>
#include <fstream>
#include <iostream>
#include <type_traits>
#include <unordered_map>
@darrenjs
darrenjs / ssl_server_nonblock.c
Last active March 22, 2024 08:34
OpenSSL example using memory BIO with non-blocking socket IO
/*
This file had now been added to the git repo
https://github.com/darrenjs/openssl_examples
... which also includes a non blocking client example.
-------------------------------------------------------------------------------
ssl_server_nonblock.c -- Copyright 2017 Darren Smith -- MIT license