project(ParallelSTL VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} LANGUAGES CXX)
set(PSTL_PARALLEL_BACKEND "serial" CACHE STRING "Threading backend to use. Valid choices are 'serial' and 'tbb'. The default is 'serial'.")
+set(PSTL_HIDE_FROM_ABI_PER_TU OFF CACHE BOOL "Whether to constrain ABI-unstable symbols to each translation unit (basically, mark them with C's static keyword).")
+set(_PSTL_HIDE_FROM_ABI_PER_TU ${PSTL_HIDE_FROM_ABI_PER_TU}) # For __pstl_config_site
if (NOT TBB_DIR)
get_filename_component(PSTL_DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
#cmakedefine _PSTL_PAR_BACKEND_SERIAL
#cmakedefine _PSTL_PAR_BACKEND_TBB
+#cmakedefine _PSTL_HIDE_FROM_ABI_PER_TU
#endif // __PSTL_CONFIG_SITE
#include "pstl_config.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __internal
} // namespace __internal
} // namespace __pstl
+
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_ALGORITHM_FWD_H */
#include "pstl_config.h"
#include "unseq_backend_simd.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __internal
} // namespace __internal
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_ALGORITHM_IMPL_H */
#include "pstl_config.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace execution
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_EXECUTION_POLICY_DEFS_H */
#include "pstl_config.h"
#include "execution_defs.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __internal
} // namespace __internal
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_EXECUTION_IMPL_H */
#include "execution_defs.h"
#include "pstl_config.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace std
{
_ForwardIterator2 __first2, _ForwardIterator2 __last2);
} // namespace std
+
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_GLUE_ALGORITHM_DEFS_H */
#include "execution_impl.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace std
{
} // namespace std
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_GLUE_ALGORITHM_IMPL_H */
#include "execution_defs.h"
#include "pstl_config.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace std
{
uninitialized_value_construct_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n);
} // namespace std
+
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_GLUE_MEMORY_DEFS_H */
#include "execution_impl.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace std
{
} // namespace std
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_GLUE_MEMORY_IMPL_H */
#include "execution_defs.h"
#include "pstl_config.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace std
{
// [reduce]
_ForwardIterator2 __d_first);
} // namespace std
+
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_GLUE_NUMERIC_DEFS_H */
#include "numeric_fwd.h"
#include "execution_impl.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace std
{
} // namespace std
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_GLUE_NUMERIC_IMPL_H_ */
#include "pstl_config.h"
#include "unseq_backend_simd.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __internal
} // namespace __internal
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_MEMORY_IMPL_H */
#include "pstl_config.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __internal
} // namespace __internal
} // namespace __pstl
+
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_NUMERIC_FWD_H */
#include "unseq_backend_simd.h"
#include "algorithm_fwd.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __internal
} // namespace __internal
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_NUMERIC_IMPL_H */
#include "pstl_config.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __serial_backend
} // namespace __serial_backend
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_PARALLEL_BACKEND_SERIAL_H */
# error Intel(R) Threading Building Blocks 2018 is required; older versions are not supported.
#endif
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __tbb_backend
} // namespace __tbb_backend
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_PARALLEL_BACKEND_TBB_H */
#include "pstl_config.h"
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
} // namespace __utils
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_PARALLEL_BACKEND_UTILS_H */
// This header defines the minimum set of parallel routines required to support Parallel STL,
// implemented on top of Intel(R) Threading Building Blocks (Intel(R) TBB) library
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __internal
} // namespace __internal
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_PARALLEL_IMPL_H */
#define _PSTL_STRING(x) _PSTL_STRING_AUX(x)
#define _PSTL_STRING_CONCAT(x, y) x #y
+#ifdef _PSTL_HIDE_FROM_ABI_PER_TU
+# define _PSTL_HIDE_FROM_ABI_PUSH \
+ _Pragma("clang attribute push(__attribute__((internal_linkage)), apply_to=any(function,record))")
+# define _PSTL_HIDE_FROM_ABI_POP _Pragma("clang attribute pop")
+#else
+# define _PSTL_HIDE_FROM_ABI_PUSH /* nothing */
+# define _PSTL_HIDE_FROM_ABI_POP /* nothing */
+#endif
+
// note that when ICC or Clang is in use, _PSTL_GCC_VERSION might not fully match
// the actual GCC version on the system.
#define _PSTL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
// This header defines the minimum set of vector routines required
// to support parallel STL.
+
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __unseq_backend
} // namespace __unseq_backend
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_UNSEQ_BACKEND_SIMD_H */
#include <new>
#include <iterator>
+_PSTL_HIDE_FROM_ABI_PUSH
+
namespace __pstl
{
namespace __internal
} // namespace __internal
} // namespace __pstl
+_PSTL_HIDE_FROM_ABI_POP
+
#endif /* _PSTL_UTILS_H */