Skip to content

Instantly share code, notes, and snippets.

View taeguk's full-sized avatar
😈
BAAAD

taeguk | thai taeguk

😈
BAAAD
View GitHub Profile
@taeguk
taeguk / EC++48.cpp
Last active May 30, 2016 19:37
EC++ no.48 my example.
#include <iostream>
template <unsigned N>
struct IsPrime {
static_assert(N >= 2, "The number must not be less than 2.");
IsPrime() = delete;
static bool value() { return static_cast<bool>(_value); }
private:
@taeguk
taeguk / scalability.txt
Last active September 29, 2016 07:02
A thinking note for Parallel Program's Scalability.
Strong Scalability
---------------------
Efficiency = c. (always)
c : constant.
* n, p can't affect efficiency in strong scalability.
Weak Scalablility
------------------------
@taeguk
taeguk / rpc_osi.txt
Last active October 13, 2016 05:49
rpc_osi.txt
OSI Layer
7 nfs
6 xdr
5 rpc
4 udp
...
stateful
stateless
@taeguk
taeguk / count.sh
Created October 19, 2016 08:46
Count lines of the codes.
find . -regextype posix-egrep -regex ".*\.(py|sh|proto)$" -not -path "./src/dist_system/protocol/pb/*" | xargs wc -l | awk '{s+=$1} END {print s}'
@taeguk
taeguk / dist-note.txt
Last active October 25, 2016 05:28
Distributed Programming Lecture Note
idempotent REQ = self-contained REQ (Request containes the state itself.)
At least Once RPC Call Semantic needs idempotent REQ.
@taeguk
taeguk / dist-note2.txt
Created November 1, 2016 05:47
dist-note2.txt
transient : TCP
- connection
persistent : scalability good
@taeguk
taeguk / cuda.txt
Created December 8, 2016 07:31
CUDA
CUDA ILP -> by compiler? or by hardware?
CUDA -> in-order? or out-of-order?
Occupancy = # of active warps / # of max resident warps
Occupancy is determined from block size, register usage per a thread, shared memory usage per a thread.
shared memory usage per a thread = shared memory usage in a block / block size.
# of blocks >= # of SMs is good.
@taeguk
taeguk / atomic_several_variables.cpp
Last active December 14, 2016 20:31
Abstracted class combining several variables to one variable for atomic instructions.
#include <iostream>
#include <atomic>
#include <cstddef>
#include <limits>
#include <cstdint>
using namespace std;
class BaseIndexD32
{
@taeguk
taeguk / solve_ecl.sh
Last active December 22, 2016 12:56
solve_ecl.sh
: '
Sogang University.
Embedded Computer Architecture Class.
2016.
Helpful Bash Script HOMEWORK #3
Made by taeguk (http://taeguk.me).
'
##### Problem 1
@taeguk
taeguk / native_lang_comp.md
Last active April 18, 2017 16:08
Native Programming Languages Comparison (C++, Rust, Swift, Go)

Comparison Summary

Feature C++11/14 Rust Swift3 Go
Memory Management Manual (In convection, Use Smart Pointer) Manual (But, compiler checks correctness.) ARC(Automatic Reference Counting) Garbage Collection
Platform Many Windows, Linux, OS X OSX, Ubuntu Windows, Linux, OS X, FreeBSD, Plan 9
Implementations GCC, Clang, MSVC, ... www.rust-lang.org https://swift.org https://golang.org