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 / haha4.c
Created June 22, 2017 19:30
haha4.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <syslog.h>
static void start_skeleton_daemon()
{
@taeguk
taeguk / aaaa.txt
Created June 25, 2017 19:44
aaaa.txt
[tkwon@bob1 bin]$ ./benchmark_partition_copy --vector_size 100000000 --hpx:threads 16
-------------- Benchmark Config --------------
seed : 1498419087
vector_size : 100000000
test_count : 10
os threads : 16
----------------------------------------------
* Preparing Benchmark...
* Running Benchmark...
@taeguk
taeguk / opti-note.txt
Created July 5, 2017 12:04
opti-note.txt
unowned pointer/reference -> raw pointer
master ownership -> unique_ptr
@taeguk
taeguk / result.txt
Created July 8, 2017 18:17
HPX parallel::partition_copy performance test result with policy.executor() instead of sync in scan partitioner.
[tkwon@bob1 hpx_build]$ ./bin/benchmark_partition_copy --vector_size 100000000 --hpx:threads 16 --test_count 10 --iterator_tag forward
-------------- Benchmark Config --------------
seed : 1499537609
vector_size : 100000000
iterator_tag : forward
test_count : 10
os threads : 16
----------------------------------------------
* Preparing Benchmark...
@taeguk
taeguk / unique_copy_performance.txt
Created July 11, 2017 15:44
HPX parallel::unique_copy performance test result with policy.executor() instead of sync in scan_partitioner.
[tkwon@bob1 hpx_build]$ ./bin/benchmark_unique_copy --vector_size 1000000 --hpx:threads 16 --test_count 10 --iterator_tag forward --random_range 1
-------------- Benchmark Config --------------
seed : 1499787616
vector_size : 1000000
random_range : 1
iterator_tag : forward
test_count : 10
os threads : 16
----------------------------------------------
@taeguk
taeguk / my_std_rotate.cpp
Created July 12, 2017 08:54
my_std_rotate.cpp
// VS http://en.cppreference.com/w/cpp/algorithm/rotate
template <class ForwardIt>
ForwardIt rotate(ForwardIt first, ForwardIt n_first, ForwardIt last)
{
if(first == n_first) return last;
if(n_first == last) return first;
ForwardIt next = n_first;
do {
@taeguk
taeguk / Optimized_C++_note.md
Last active July 17, 2017 08:59
My note for Optimized C++.

Chapter 6

Eliminate Copying on Function Return

void scalar_product(
    std::vector<int> const& v,
    int c,
 vector&amp; result) {
@taeguk
taeguk / error.txt
Created July 26, 2017 07:33
error.txt
[tkwon@bob1 hpx_build]$ make -j16 tests.performance.parallel_algorithms.local_.benchmark_partition
[ 9%] Built target hpx_init
[100%] Built target hpx
Scanning dependencies of target benchmark_partition_exe
[100%] Building CXX object tests/performance/parallel_algorithms/local/CMakeFiles/benchmark_partition_exe.dir/benchmark_partition.cpp.o
In file included from /home/tkwon/hpx/hpx/lcos/local/packaged_continuation.hpp:27:0,
from /home/tkwon/hpx/hpx/lcos/future.hpp:1483,
from /home/tkwon/hpx/hpx/runtime/actions/trigger.hpp:11,
from /home/tkwon/hpx/hpx/runtime/actions/continuation.hpp:14,
from /home/tkwon/hpx/hpx/runtime/actions/action_invoke_no_more_than.hpp:12,
@taeguk
taeguk / errorrr.txt
Created August 9, 2017 13:11
cmake_error.txt
[tkwon@bob1 qqqq]$ module list
Currently Loaded Modulefiles:
1) cmake/3.8.1 3) clang/3.8.1
2) hwloc/1.11.3 4) boost/1.60.0-clang3.8.1
[tkwon@bob1 qqqq]$ !cm
cmake -DHPX_WITH_TOOLS=ON ~/hpx
-- The CXX compiler identification is Clang 3.8.1
-- The C compiler identification is Clang 3.8.1
-- Check for working CXX compiler: /opt/mn/clang/3.8.1/bin/clang++
-- Check for working CXX compiler: /opt/mn/clang/3.8.1/bin/clang++ -- works
@taeguk
taeguk / tmp.cpp
Created August 10, 2017 17:09
tmp.cpp
template <typename RandIter1, typename RandIter2,
typename Comp, typename Proj1, typename Proj2,
HPX_CONCEPT_REQUIRES_(
hpx::traits::is_random_access_iterator<RandIter1>::value &&
hpx::traits::is_random_access_iterator<RandIter2>::value)>
std::pair<RandIter1, RandIter2>
find_half_point(RandIter1 first1, RandIter1 last1,
RandIter2 first2, RandIter2 last2, Comp& comp,
Proj1& proj1, Proj2& proj2)
{