Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add implementation of dpnp.nextafter function #1938

Merged
merged 7 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dpnp/backend/extensions/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ set(_elementwise_sources
${CMAKE_CURRENT_SOURCE_DIR}/log1p.cpp
${CMAKE_CURRENT_SOURCE_DIR}/log2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mul.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nextafter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pow.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rint.cpp
${CMAKE_CURRENT_SOURCE_DIR}/sin.cpp
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/abs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/acos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/acosh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/asin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/asinh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/atan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/atan2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/atanh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/cbrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/ceil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/conj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/cos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/cosh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/div.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/exp2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/expm1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
7 changes: 3 additions & 4 deletions dpnp/backend/extensions/vm/floor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@

namespace dpnp::extensions::vm
{
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace py = pybind11;
namespace py_int = dpnp::extensions::py_internal;
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

namespace impl
{
// OneMKL namespace with VM functions
namespace mkl_vm = oneapi::mkl::vm;
namespace ew_cmn_ns = dpctl::tensor::kernels::elementwise_common;
namespace mkl_vm = oneapi::mkl::vm; // OneMKL namespace with VM functions
namespace tu_ns = dpctl::tensor::type_utils;

/**
* @brief A factory to define pairs of supported types for which
Expand Down
Loading
Loading