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 / set_commit_date_from_author_date.sh
Created April 27, 2017 03:02
Set commit date to it's author date.
git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'
@taeguk
taeguk / embedded-system-software-note.txt
Last active May 16, 2017 05:18
embedded-system-software-note.txt
Process Context : context of kernel flow through system call of user process
Interrupt Context : context of kernel flow through interrupt by I/O devices.
Kernel Control Flow
- Process Context (by system call)
- Interrupt Context (by interrupt)
kmalloc GFP_KERNEL
sleep
@taeguk
taeguk / a.cpp
Created May 17, 2017 16:32
a.cpp
hpx::future<std::uint64_t> fibonacci(std::uint64_t n, std::string prefix)
{
if (n < 2) return hpx::make_ready_future(n);
if (n < threshold) return hpx::make_ready_future(fibonacci_serial(n));
auto new_prefix = prefix + "->" + std::to_string(n);
std::cout << "[Debug] " << new_prefix << std::endl;
hpx::future<std::uint64_t> lhs_future = hpx::async(&fibonacci, n-1, new_prefix);
hpx::future<std::uint64_t> rhs_future = fibonacci(n - 2, new_prefix);
@taeguk
taeguk / b.cpp
Created May 17, 2017 16:52
b.cpp
hpx::future<std::uint64_t> fibonacci(std::uint64_t n, std::string prefix)
{
if (n < 2) return hpx::make_ready_future(n);
if (n < threshold) return hpx::make_ready_future(fibonacci_serial(n));
auto new_prefix = prefix + "->" + std::to_string(n);
std::cout << "[Debug] " << new_prefix << std::endl;
hpx::future<std::uint64_t> lhs_future = hpx::async(&fibonacci, n-1, new_prefix);
for (int i = 0; i < 1000000000; ++i) int j = i*i;
[tkwon@bob1 hpx_build]$ make clean
[tkwon@bob1 hpx_build]$
[tkwon@bob1 hpx_build]$ make -j8 examples.quickstart.fibonacci_futures
[ 0%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_main.cpp.o
[ 0%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_main_argc_argv.cpp.o
[ 0%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_main_winsocket.cpp.o
[ 0%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_main_variables_map.cpp.o
[ 0%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_user_main.cpp.o
[ 0%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_user_main_argc_argv.cpp.o
[tkwon@bob1 hpx_build]$ time ctest -R tests.unit.parallel
Test project /home/tkwon/hpx_build
Start 317: tests.unit.parallel.spmd_block
1/178 Test #317: tests.unit.parallel.spmd_block ..........................***Failed 0.04 sec
Start 318: tests.unit.parallel.task_block
2/178 Test #318: tests.unit.parallel.task_block ..........................***Failed 0.04 sec
Start 319: tests.unit.parallel.task_block_executor
3/178 Test #319: tests.unit.parallel.task_block_executor .................***Failed 0.06 sec
Start 320: tests.unit.parallel.task_block_par
4/178 Test #320: tests.unit.parallel.task_block_par ......................***Failed 0.06 sec
@taeguk
taeguk / note.txt
Last active June 1, 2017 06:48
backup note for contributing is_heap and is_heap_until to HPX.
Check Box
---------------
- [x] implementation of is_heap.
- [x] unit tests for is_heap.
- [x] implementation of is_heap_until.
- [x] unit tests for is_heap_until.
- [ ] benchmark codes for is_heap.
- [ ] benchmark codes for is_heap_until.
- [ ] benchmark for is_heap_until.
// Added by taeguk.
static void fb_fake_for_taeguk(private_handle_t const* hnd, private_module_t* m)
{
static int called_cnt = 0;
int width = m->info.xres;
int height = m->info.yres;
int bpp = m->info.bits_per_pixel / 8;
int xoffset = m->info.xoffset;
int yoffset = m->info.yoffset;
@taeguk
taeguk / haha2.cpp
Created June 22, 2017 09:54
haha2.cpp
// Added by taeguk.
static void fb_fake_for_taeguk(private_handle_t const* hnd, private_module_t* m)
{
static int called_cnt = 0;
int width = m->info.xres;
int height = m->info.yres;
int bpp = m->info.bits_per_pixel / 8;
int xoffset = m->info.xoffset;
int yoffset = m->info.yoffset;
@taeguk
taeguk / haha3.cpp
Created June 22, 2017 16:33
haha3.cpp
static volatile int taeguk = 0;
// Added by taeguk.
static void fb_fake_for_taeguk(char* fb_ptr/*private_handle_t const* hnd*/, private_module_t* m)
{
static int called_cnt = 0;
int width = m->info.xres;
int height = m->info.yres;
int bpp = m->info.bits_per_pixel / 8;