Skip to content

Instantly share code, notes, and snippets.

View srinivasyadav18's full-sized avatar

Srinivas Yadav srinivasyadav18

  • STE||AR GROUP
View GitHub Profile
@srinivasyadav18
srinivasyadav18 / file.cpp
Created April 25, 2021 15:20
Function object parameters
/*
I have a function object or function F (given by user).
I want to calculate number of parameters that F takes.
Or I want to store parameters in parameter pack
Or apply some operations on parameters like,
check if first parameter (or nth parameter) is ref or
const ref or value etc..
*/
I still did not get clarity about unseq.
I am clear that datapar/dataseq is about using simd or
some kind vector intrinsics and provide vectorization.
But what does unseq do?
could you elobarate on this
--> "while unseq leaves the vectorization to the compiler"
#include <Vc/IO>
#include <Vc/Vc>
#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>
#include <omp.h>
#include <algorithm>
#include <chrono>
Static configuration:
---------------------
Core library:
HPX_WITH_LOGGING=ON
HPX_WITH_DYNAMIC_HPX_MAIN=ON
HPX_WITH_DISTRIBUTED_RUNTIME=ON
HPX_WITH_IO_COUNTERS=ON
HPX_WITH_DATAPAR_VC=ON
HPX_WITH_DATAPAR=ON
HPX_WITH_AUTOMATIC_SERIALIZATION_REGISTRATION=ON
@srinivasyadav18
srinivasyadav18 / .cpp
Last active March 13, 2021 11:52
Sample program for Vc
#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>
#include <iostream>
#include <vector>
static constexpr hpx::execution::dataseq_policy dataseq;
int hpx_main()
{
std::cout << "HPX VC test\n";
@srinivasyadav18
srinivasyadav18 / .cpp
Created March 13, 2021 07:37
hpx::ranges
#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>
#include <boost/range/irange.hpp>
#include <iostream>
int hpx_main()
{
std::cout << "HPX VC test\n";
hpx::execution::dataseq_policy dataseq;
auto range = boost::irange(0, 10);
In file included from /home/kmit/srinivas/.local/builds/hpx/libs/parallelism/algorithms/include/hpx/parallel/util/transform_loop.hpp:179,
from /home/kmit/srinivas/.local/builds/hpx/libs/parallelism/algorithms/include/hpx/parallel/algorithms/transform.hpp:196,
from /home/kmit/srinivas/.local/builds/hpx/libs/parallelism/algorithms/include/hpx/parallel/container_algorithms/transform.hpp:402,
from /home/kmit/srinivas/.local/builds/hpx/libs/parallelism/algorithms/include/hpx/parallel/container_algorithms.hpp:45,
from /home/kmit/srinivas/.local/builds/hpx/libs/full/include/include/hpx/algorithm.hpp:11,
from /home/kmit/srinivas/.local/builds/hpx/libs/full/include/include/hpx/hpx.hpp:10,
from /home/kmit/srinivas/.local/builds/hpx/libs/full/checkpoint/examples/1d_stencil_4_checkpoint.cpp:24:
/home/kmit/srinivas/.local/builds/hpx/libs/parallelism/algorithms/include/hpx/parallel/datapar/transform_loop.hpp: In static mem
@srinivasyadav18
srinivasyadav18 / gist:710fdf12c489d998f71fa709cab9708c
Created March 11, 2021 03:45
Missing headers for is_threads_executor
In file included from /home/kmit/srinivas/.local/builds/hpx/libs/parallelism/executors/include/hpx/executors/execution_policy.hpp:21,
from /home/kmit/srinivas/.local/builds/hpx/libs/parallelism/algorithms/include/hpx/parallel/algorithms/reduce.hpp:223,
from /home/kmit/srinivas/.local/builds/hpx/libs/full/collectives/include/hpx/collectives/detail/communicator.hpp:25,
from /home/kmit/srinivas/.local/builds/hpx/libs/full/collectives/include/hpx/collectives/all_gather.hpp:102,
from /home/kmit/srinivas/.local/builds/hpx/build/libs/full/collectives/include/hpx/modules/collectives.hpp:14,
from /home/kmit/srinivas/.local/builds/hpx/libs/full/runtime_distributed/src/server/runtime_support_server.cpp:22:
/home/kmit/srinivas/.local/builds/hpx/libs/parallelism/executors/include/hpx/executors/datapar/execution_policy.hpp: In member function ‘typename hpx::parallel::execution::rebind_executor<hpx::execution::v1::dataseq_task_policy, Execu
This file has been truncated, but you can view the full file.
/usr/bin/cmake -S/home/kmit/srinivas/.local/builds/hpx -B/home/kmit/srinivas/.local/builds/hpx/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/kmit/srinivas/.local/builds/hpx/build/CMakeFiles /home/kmit/srinivas/.local/builds/hpx/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/kmit/srinivas/.local/builds/hpx/build'
make -f libs/core/config_registry/CMakeFiles/hpx_config_registry.dir/build.make libs/core/config_registry/CMakeFiles/hpx_config_registry.dir/depend
make[2]: Entering directory '/home/kmit/srinivas/.local/builds/hpx/build'
cd /home/kmit/srinivas/.local/builds/hpx/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/kmit/srinivas/.local/builds/hpx /home/kmit/srinivas/.local/builds/hpx/libs/core/config_registry /home/kmit/srinivas/.local/builds/hpx/build /home/kmit/srinivas/.local/builds/hpx/build/libs/core/config_registry /home/kmit/srinivas/.local/builds/hpx/build/libs/core/config_regis
@srinivasyadav18
srinivasyadav18 / gist:a35a16fe97bc9cc97540230a7f881e8a
Created March 9, 2021 15:18
Complete verbose output of make
/usr/bin/cmake -S/home/kmit/srinivas/.local/builds/hpx -B/home/kmit/srinivas/.local/builds/hpx/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/kmit/srinivas/.local/builds/hpx/build/CMakeFiles /home/kmit/srinivas/.local/builds/hpx/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/kmit/srinivas/.local/builds/hpx/build'
make -f libs/core/config_registry/CMakeFiles/hpx_config_registry.dir/build.make libs/core/config_registry/CMakeFiles/hpx_config_registry.dir/depend
make[2]: Entering directory '/home/kmit/srinivas/.local/builds/hpx/build'
cd /home/kmit/srinivas/.local/builds/hpx/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/kmit/srinivas/.local/builds/hpx /home/kmit/srinivas/.local/builds/hpx/libs/core/config_registry /home/kmit/srinivas/.local/builds/hpx/build /home/kmit/srinivas/.local/builds/hpx/build/libs/core/config_registry /home/kmit/srinivas/.local/builds/hpx/build/libs/core/config_regis