rose: give longer literals to accel analysis

This commit is contained in:
Justin Viiret
2016-12-22 16:33:14 +11:00
committed by Matthew Barr
parent 2fda8c0b20
commit 68a35ff3b8
3 changed files with 66 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016, Intel Corporation
* Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -89,6 +89,14 @@ auto make_vector_from(const std::pair<It, It> &range)
return std::vector<T>(range.first, range.second);
}
/** \brief Sort a sequence container and remove duplicates. */
template <typename C>
void sort_and_unique(C &container) {
std::sort(std::begin(container), std::end(container));
container.erase(std::unique(std::begin(container), std::end(container)),
std::end(container));
}
/** \brief Returns a set containing the keys in the given associative
* container. */
template <typename C>