// -*- C++ -*-
//===-- execution ---------------------------------------------------------===//
//
// Copyright (C) 2017-2019 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// This file incorporates work covered by the following copyright and permission
// notice:
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
//
//===----------------------------------------------------------------------===//

#ifndef __PSTL_execution
#define __PSTL_execution

#include "internal/pstl_config.h"
#include "internal/execution_defs.h"

#define __PSTL_EXECUTION_POLICIES_DEFINED 1

#if __PSTL_ALGORITHM_FORWARD_DECLARED
#    include "internal/glue_algorithm_impl.h"
#endif

#if __PSTL_MEMORY_FORWARD_DECLARED
#    include "internal/glue_memory_impl.h"
#endif

#if __PSTL_NUMERIC_FORWARD_DECLARED
#    include "internal/glue_numeric_impl.h"
#endif

#if __PSTL_CPP17_EXECUTION_POLICIES_PRESENT
__PSTL_PRAGMA_MESSAGE_POLICIES("The <Parallel STL> execution policies are defined in the namespace __pstl::execution")
#    include "internal/algorithm_impl.h"
#    include "internal/numeric_impl.h"
#    include "internal/parallel_backend.h"
#else
#    include "internal/glue_execution_defs.h"
__PSTL_PRAGMA_MESSAGE_POLICIES(
    "The <Parallel STL> execution policies are injected into the standard namespace std::execution")
#endif

//TODO: __pstl::execution namespace is injected into the pstl::execution namespace when the implementation is not a part of
// standard C++ library
namespace pstl
{
namespace execution
{
using namespace __pstl::execution;
}
}

#endif /* __PSTL_execution */
