Skip to content

Instantly share code, notes, and snippets.

View taeguk's full-sized avatar
❄️
asdf

Taeguk Kwon taeguk

❄️
asdf
View GitHub Profile
@taeguk
taeguk / aaa.cpp
Created August 15, 2017 01:22
aaa.cpp
#include <thread>
#include <chrono>
#include <hpx/dataflow.hpp>
void haaam(int& i)
{
using namespace std::chrono_literals;
std::this_thread::sleep_for(2s);
std::cout << "[haaam] start" << std::endl;
std::this_thread::sleep_for(2s);
std::cout << "[haaam] end" << std::endl;
@taeguk
taeguk / errorrrrrrrrr.txt
Created August 12, 2017 17:34
errorrrrrrrrr.txt
[tkwon@bob1 hpx_build]$ make -j16 tests.performance.parallel_algorithms.local_.benchmark_is_heap
Scanning dependencies of target hpx_init
[ 8%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_main.cpp.o
[ 8%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_main_variables_map.cpp.o
[ 8%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_main_winsocket.cpp.o
[ 8%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_main_argc_argv.cpp.o
[ 8%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_user_main.cpp.o
[ 8%] Building CXX object src/CMakeFiles/hpx_init.dir/hpx_user_main_argc_argv.cpp.o
[ 8%] Building CXX object src/CMakeFiles/hpx_init.dir/util/lightweight_test.cpp.o
[ 8%] Building CXX object src/CMakeFiles/hpx_init.dir/main.cpp.o
@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)
{
@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 / 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 / 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 / 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 / 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 / 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 / opti-note.txt
Created July 5, 2017 12:04
opti-note.txt
unowned pointer/reference -> raw pointer
master ownership -> unique_ptr