Skip to content

Instantly share code, notes, and snippets.

View lovung's full-sized avatar
🇻🇳
Vietnamese

Vu Long (Drake) lovung

🇻🇳
Vietnamese
View GitHub Profile
@zeebo
zeebo / buffer.go
Created July 13, 2021 14:09
Buffer Benchmark
package buffer
import (
"errors"
"os"
"unsafe"
)
const (
entrySize = 32 // or maybe 28?
@ilikerobots
ilikerobots / main.dart
Last active June 21, 2022 10:45
Basic examples: Dart call() and Function.apply()
class Adder implements Function {
call(int a, int b) => a + b;
}
class Incrementer implements Function {
int _amt;
Incrementer(this._amt);
call(int a) => a + _amt;
}
@mre
mre / bitonic_sort.cu
Last active May 16, 2024 16:41
Bitonic Sort on CUDA. On a quick benchmark it was 10x faster than the CPU version.
/*
* Parallel bitonic sort using CUDA.
* Compile with
* nvcc -arch=sm_11 bitonic_sort.cu
* Based on http://www.tools-of-computing.com/tc/CS/Sorts/bitonic_sort.htm
* License: BSD 3
*/
#include <stdlib.h>
#include <stdio.h>