Commit 7581ccfa by FritzFlorian

Replace boost range by header only dependency.

This removes boost as an dependency from our code and makes our project
again only dependent on C++11 compilers (no external dependency).
parent 7c227cd8
Pipeline #1266 failed with stages
in 36 seconds
......@@ -4,6 +4,14 @@ A collection of stuff that we noticed during development.
Useful later on two write a project report and to go back
in time to find out why certain decisions where made.
## 14.06.2019 - Range Class
For iterating on integers (e.g. from 0 to 10) a translation from
integers to iterators on them is necessary.
Instead of rolling out our own implementation we found a
[standalone header file](https://bitbucket.org/AraK/range/src/default/)
that we will use for now to not have the boilerplate work.
## 11.06.2019 - Parallel Scan
Our parallel scan is oriented on the
......
......@@ -31,14 +31,14 @@ add_library(pls STATIC
include/pls/internal/helpers/profiler.h
include/pls/internal/helpers/mini_benchmark.h
include/pls/internal/helpers/unique_id.h
include/pls/internal/helpers/range.h
include/pls/internal/scheduling/thread_state.h
include/pls/internal/scheduling/scheduler.h src/internal/scheduling/scheduler.cpp
include/pls/internal/scheduling/scheduler_impl.h
include/pls/internal/scheduling/task.h src/internal/scheduling/task.cpp
include/pls/internal/scheduling/scheduler_memory.h src/internal/scheduling/scheduler_memory.cpp
include/pls/internal/scheduling/lambda_task.h include/pls/internal/data_structures/deque.h
)
include/pls/internal/scheduling/lambda_task.h include/pls/internal/data_structures/deque.h)
# Add everything in `./include` to be in the include path of this project
target_include_directories(pls
PUBLIC
......
......@@ -6,7 +6,7 @@ namespace pls {
namespace algorithm {
template<typename Function>
void for_each_range(size_t first, size_t last, const Function &function);
void for_each_range(unsigned long first, unsigned long last, const Function &function);
template<typename RandomIt, typename Function>
void for_each(RandomIt first, RandomIt last, const Function &function);
......
......@@ -6,9 +6,7 @@
#include "pls/internal/scheduling/scheduler.h"
#include "pls/internal/helpers/unique_id.h"
// TODO: Replace with own integer iterator to remove dependency
#include <boost/range/irange.hpp>
#include "pls/internal/helpers/range.h"
namespace pls {
namespace algorithm {
......@@ -44,8 +42,8 @@ void for_each(RandomIt first, RandomIt last, const Function &function) {
}
template<typename Function>
void for_each_range(size_t first, size_t last, const Function &function) {
auto range = boost::irange(first, last);
void for_each_range(unsigned long first, unsigned long last, const Function &function) {
auto range = pls::internal::helpers::range(first, last);
internal::for_each(range.begin(), range.end(), function);
}
......
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment