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

Implement support CFD for dpnp.isclose and dpnp.allclose functions #1937

Merged
merged 11 commits into from
Jul 26, 2024
1 change: 0 additions & 1 deletion dpnp/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ set(DPNP_SRC
kernels/dpnp_krnl_elemwise.cpp
kernels/dpnp_krnl_fft.cpp
kernels/dpnp_krnl_indexing.cpp
kernels/dpnp_krnl_logic.cpp
kernels/dpnp_krnl_mathematical.cpp
kernels/dpnp_krnl_random.cpp
kernels/dpnp_krnl_reduction.cpp
Expand Down
75 changes: 0 additions & 75 deletions dpnp/backend/include/dpnp_iface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,81 +100,6 @@ INP_DLLEXPORT void dpnp_memory_memcpy_c(DPCTLSyclQueueRef q_ref,
size_t size_in_bytes);
INP_DLLEXPORT void
dpnp_memory_memcpy_c(void *dst, const void *src, size_t size_in_bytes);
/**
* @ingroup BACKEND_API
* @brief Test whether all array elements along a given axis evaluate to True.
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array.
* @param [out] result Output array.
* @param [in] size Number of input elements in `array`.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType, typename _ResultType>
INP_DLLEXPORT DPCTLSyclEventRef
dpnp_all_c(DPCTLSyclQueueRef q_ref,
const void *array,
void *result,
const size_t size,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType, typename _ResultType>
INP_DLLEXPORT void
dpnp_all_c(const void *array, void *result, const size_t size);

/**
* @ingroup BACKEND_API
* @brief Returns True if two arrays are element-wise equal within a tolerance.
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array1_in First input array.
* @param [in] array2_in Second input array.
* @param [out] result1 Output array.
* @param [in] size Number of input elements in `array`.
* @param [in] rtol The relative tolerance parameter.
* @param [in] atol The absolute tolerance parameter.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType1, typename _DataType2, typename _ResultType>
INP_DLLEXPORT DPCTLSyclEventRef
dpnp_allclose_c(DPCTLSyclQueueRef q_ref,
const void *array1_in,
const void *array2_in,
void *result1,
const size_t size,
double rtol,
double atol,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType1, typename _DataType2, typename _ResultType>
INP_DLLEXPORT void dpnp_allclose_c(const void *array1_in,
const void *array2_in,
void *result1,
const size_t size,
double rtol,
double atol);

/**
* @ingroup BACKEND_API
* @brief Test whether any array element along a given axis evaluates to True.
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array.
* @param [out] result Output array.
* @param [in] size Number of input elements in `array`.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType, typename _ResultType>
INP_DLLEXPORT DPCTLSyclEventRef
dpnp_any_c(DPCTLSyclQueueRef q_ref,
const void *array,
void *result,
const size_t size,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType, typename _ResultType>
INP_DLLEXPORT void
dpnp_any_c(const void *array, void *result, const size_t size);

/**
* @ingroup BACKEND_API
Expand Down
5 changes: 0 additions & 5 deletions dpnp/backend/include/dpnp_iface_fptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@
enum class DPNPFuncName : size_t
{
DPNP_FN_NONE, /**< Very first element of the enumeration */
DPNP_FN_ALL, /**< Used in numpy.all() impl */
DPNP_FN_ALLCLOSE, /**< Used in numpy.allclose() impl */
DPNP_FN_ALLCLOSE_EXT, /**< Used in numpy.allclose() impl, requires extra
parameters */
DPNP_FN_ANY, /**< Used in numpy.any() impl */
DPNP_FN_ARGMAX, /**< Used in numpy.argmax() impl */
DPNP_FN_ARGMIN, /**< Used in numpy.argmin() impl */
DPNP_FN_ARGSORT, /**< Used in numpy.argsort() impl */
Expand Down
Loading
Loading