Skip to content

Instantly share code, notes, and snippets.

Avatar

Srinivas Yadav srinivasyadav18

  • Hyderabad, India
View GitHub Profile
@srinivasyadav18
srinivasyadav18 / file.cpp
Created Apr 25, 2021
Function object parameters
View file.cpp
/*
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..
*/
View gist:f3b9ede8cff1e8b23b487290e877c907
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"
View .cpp
#include <Vc/IO>
#include <Vc/Vc>
#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>
#include <omp.h>
#include <algorithm>
#include <chrono>
View gist:c70de1b7f0ac35223ee6792628cf2a4e
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 Mar 13, 2021
Sample program for Vc
View .cpp
#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";
View .cpp
#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);
View gist:3b55c1259074a2517d8893d4870c41fe
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 Mar 11, 2021
Missing headers for is_threads_executor
View gist:710fdf12c489d998f71fa709cab9708c
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
View gist:9517ca31fd303a8b4ff1a6c8c3dc949d
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
View gist:a35a16fe97bc9cc97540230a7f881e8a
/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