// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Copyright (C) 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 _ONEDPL_NUMERIC
#define _ONEDPL_NUMERIC

#include "oneapi/dpl/internal/common_config.h"
// ATTENTION!!! Include the header from the C++ standard library before the oneDPL config header to see whether the _PSTL_VERSION macro is defined
#include <numeric>
#include "oneapi/dpl/pstl/onedpl_config.h"
#include "oneapi/dpl/internal/gcd_impl.h"
#include "oneapi/dpl/internal/serial_numeric_impl.h"

#if !_ONEDPL_NUMERIC_FORWARD_DECLARED
// If not declared, pull in forward declarations
#    include "oneapi/dpl/pstl/glue_numeric_defs.h"
#    define _ONEDPL_NUMERIC_FORWARD_DECLARED 1
#endif // !_ONEDPL_NUMERIC_FORWARD_DECLARED

#if _ONEDPL_EXECUTION_POLICIES_DEFINED
// If <execution> has already been included, pull in implementations
#    include "oneapi/dpl/pstl/glue_numeric_impl.h"
#endif // _ONEDPL_EXECUTION_POLICIES_DEFINED

namespace oneapi
{
namespace dpl
{
using ::std::accumulate;
using ::std::inner_product;
using ::std::iota;
using ::std::partial_sum;
} // namespace dpl

} // namespace oneapi

namespace dpl = oneapi::dpl;

namespace std
{
using oneapi::dpl::adjacent_difference;
using oneapi::dpl::exclusive_scan;
using oneapi::dpl::inclusive_scan;
using oneapi::dpl::reduce;
using oneapi::dpl::transform_exclusive_scan;
using oneapi::dpl::transform_inclusive_scan;
using oneapi::dpl::transform_reduce;
} // namespace std

#endif // _ONEDPL_NUMERIC
