-
Notifications
You must be signed in to change notification settings - Fork 766
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
[SYCL] Introduce sycl complex marray specialization #8647
Closed
jle-quel
wants to merge
53
commits into
intel:sycl
from
jle-quel:jle-quel/introduce-sycl_complex_marray-implementation
Closed
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
9eca5bc
[SYCL][MARRAY] introduce sycl complex marray specialization
jle-quel c5ba5af
[SYCL][MARRAY] add marray specialization's tests
jle-quel 98eb062
[SYCL][Complex] fix typo in complex's tests
jle-quel 9a7570c
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel 56a9ddd
Add helper functions for marray complex testing
jle-quel ab1d887
Fix warning messages
jle-quel cbec286
Add test cases for marray complex
jle-quel 5a5f647
Add marray complex getter tests
jle-quel 7db90aa
Add marray complex math tests
jle-quel 0a2b793
Add marray complex operator tests
jle-quel f9e3e76
Address PR's feedbacks by modifying the marray's constructors
jle-quel 97f81e9
format code with the latest clang-format
jle-quel 1d6669c
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel d5b7664
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel 95c0453
Update marray tests with the latests %{build} and %{run}
jle-quel 46079c2
Move marray's helper traits to detail's namespace, so exp::marray doe…
jle-quel c40fb02
Apply clang-format
jle-quel 6fd924d
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel 5bced0f
Encapsulate marray's helper into struct which is a friend of class ma…
jle-quel 1fb5a4f
Update marray's contructor tests
jle-quel 91c14e5
format code with the latest clang-format
jle-quel 0b54a77
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel 18b4277
Replace ComplexDataT by value_type
jle-quel 1627da7
Remove -fsycl-device-code-split=per_kernel from the tests
jle-quel 884b12e
Enable std::enable_if via Return type isntead of type template parame…
jle-quel 79b2711
Run clang-format
jle-quel e4a1dbd
Remove special test cases for windows
jle-quel d2df5d1
Fix marray<std::complex<>> casting to never be a marray<std::complex<…
jle-quel c890407
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel 8d086dd
Use a less conflicting name for defining the marray's macros
jle-quel fcb3116
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel f194bce
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel 58d19d3
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel b92cce6
Apply clang-format
jle-quel b155c1d
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel da12998
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel a179509
Split marray header file and tests into multiple files
jle-quel 8799339
Apply clang-format
jle-quel f756d38
Remove the real and imag member functions
jle-quel 051db38
Add new real and imag free functions
jle-quel 80b41ba
Update tests
jle-quel 4dd8cd7
Apply clang-format
jle-quel 95258e1
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel 4728073
Rename HelperFlattenMArrayArg to FlattenMArrayArgHelper and update na…
jle-quel fd2759f
Update FIXME comments
jle-quel 152156c
Make marray_data_t a private type alias
jle-quel 735b2b8
Apply review's and new specification's changes
jle-quel 0fed583
Apply clang-format
jle-quel 5bbb307
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel 38e2f9c
Rewrite tests that fail when usm_shared_allocations is not supported
jle-quel a3b4b05
Apply clang-format manually
jle-quel 8a58080
Refactor marray builtins
jle-quel f38241a
Merge branch 'sycl' of github.com:jle-quel/llvm into jle-quel/introdu…
jle-quel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
220 changes: 220 additions & 0 deletions
220
sycl/include/sycl/ext/oneapi/experimental/complex/detail/marray.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
//===- marray.hpp ---------------------------------------------------------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "common.hpp" | ||
|
||
#include <sycl/marray.hpp> | ||
#include <sycl/types.hpp> | ||
|
||
namespace sycl { | ||
inline namespace _V1 { | ||
|
||
template <typename T, std::size_t NumElements> | ||
class marray<sycl::ext::oneapi::experimental::complex<T>, NumElements> { | ||
private: | ||
using ComplexDataT = sycl::ext::oneapi::experimental::complex<T>; | ||
using MarrayDataT = typename sycl::detail::vec_helper<ComplexDataT>::RetType; | ||
|
||
public: | ||
using value_type = ComplexDataT; | ||
using reference = ComplexDataT &; | ||
using const_reference = const ComplexDataT &; | ||
using iterator = ComplexDataT *; | ||
using const_iterator = const ComplexDataT *; | ||
|
||
private: | ||
value_type MData[NumElements]; | ||
|
||
template <size_t... Is> | ||
constexpr marray(const std::array<value_type, NumElements> &Arr, | ||
std::index_sequence<Is...>) | ||
: MData{Arr[Is]...} {} | ||
|
||
// detail::FlattenMArrayArgHelper::MArrayToArray needs to have access to | ||
// MData. | ||
// FIXME: If the subscript operator is made constexpr this can be removed. | ||
friend class detail::FlattenMArrayArgHelper; | ||
|
||
public: | ||
constexpr marray() : MData{} {}; | ||
|
||
explicit constexpr marray(const value_type &arg) | ||
: marray{sycl::detail::RepeatValue<NumElements>( | ||
static_cast<MarrayDataT>(arg)), | ||
std::make_index_sequence<NumElements>()} {} | ||
|
||
template < | ||
typename... ArgTN, | ||
typename = std::enable_if_t< | ||
sycl::detail::AllSuitableArgTypes<value_type, ArgTN...>::value && | ||
sycl::detail::GetMArrayArgsSize<ArgTN...>::value == NumElements>> | ||
constexpr marray(const ArgTN &...Args) | ||
: marray{ | ||
sycl::detail::MArrayArgArrayCreator<value_type, ArgTN...>::Create( | ||
Args...), | ||
std::make_index_sequence<NumElements>()} {} | ||
|
||
constexpr marray(const marray<value_type, NumElements> &rhs) = default; | ||
constexpr marray(marray<value_type, NumElements> &&rhs) = default; | ||
|
||
// Available only when: NumElements == 1 | ||
template <std::size_t N = NumElements, | ||
typename = std::enable_if_t<N == 1, value_type>> | ||
operator value_type() const { | ||
return MData[0]; | ||
} | ||
|
||
static constexpr std::size_t size() noexcept { return NumElements; } | ||
|
||
// subscript operator | ||
reference operator[](std::size_t i) { return MData[i]; } | ||
const_reference operator[](std::size_t i) const { return MData[i]; } | ||
|
||
marray &operator=(const marray<value_type, NumElements> &rhs) = default; | ||
marray &operator=(const value_type &rhs) { | ||
for (std::size_t i = 0; i < NumElements; ++i) { | ||
MData[i] = rhs; | ||
} | ||
return *this; | ||
} | ||
|
||
// iterator functions | ||
iterator begin() { return MData; } | ||
const_iterator begin() const { return MData; } | ||
|
||
iterator end() { return MData + NumElements; } | ||
const_iterator end() const { return MData + NumElements; } | ||
|
||
/// ASSIGNMENT OPERATORS | ||
|
||
#ifdef IMPL_ASSIGN_MARRAY_CPLX_OP | ||
#error "Multiple definition of IMPL_ASSIGN_MARRAY_CPLX_OP" | ||
#endif | ||
|
||
#define IMPL_ASSIGN_MARRAY_CPLX_OP(op) \ | ||
friend marray &operator op(marray & lhs, const marray & rhs) { \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
lhs[i] op rhs[i]; \ | ||
} \ | ||
return lhs; \ | ||
} \ | ||
\ | ||
friend marray &operator op(marray & lhs, const value_type & rhs) { \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
lhs[i] op rhs; \ | ||
} \ | ||
return lhs; \ | ||
} | ||
|
||
IMPL_ASSIGN_MARRAY_CPLX_OP(+=) | ||
IMPL_ASSIGN_MARRAY_CPLX_OP(-=) | ||
IMPL_ASSIGN_MARRAY_CPLX_OP(*=) | ||
IMPL_ASSIGN_MARRAY_CPLX_OP(/=) | ||
|
||
#undef IMPL_ASSIGN_MARRAY_CPLX_OP | ||
|
||
/// ARITHMETIC OPERATORS | ||
|
||
#ifdef IMPL_UNARY_MARRAY_CPLX_OP | ||
#error "Multiple definition of IMPL_UNARY_MARRAY_CPLX_OP" | ||
#endif | ||
|
||
#define IMPL_UNARY_MARRAY_CPLX_OP(op) \ | ||
friend marray operator op(const marray &lhs) { \ | ||
marray rtn; \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
rtn[i] = op lhs[i]; \ | ||
} \ | ||
return rtn; \ | ||
} | ||
|
||
IMPL_UNARY_MARRAY_CPLX_OP(+) | ||
IMPL_UNARY_MARRAY_CPLX_OP(-) | ||
|
||
#undef IMPL_UNARY_MARRAY_CPLX_OP | ||
|
||
#ifdef IMPL_ARITH_MARRAY_CPLX_OP | ||
#error "Multiple definition of IMPL_ARITH_MARRAY_CPLX_OP" | ||
#endif | ||
|
||
#define IMPL_ARITH_MARRAY_CPLX_OP(op) \ | ||
friend marray operator op(const marray &lhs, const marray &rhs) { \ | ||
marray rtn; \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
rtn[i] = lhs[i] op rhs[i]; \ | ||
} \ | ||
return rtn; \ | ||
} \ | ||
\ | ||
friend marray operator op(const marray &lhs, const value_type &rhs) { \ | ||
marray rtn; \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
rtn[i] = lhs[i] op rhs; \ | ||
} \ | ||
return rtn; \ | ||
} \ | ||
\ | ||
friend marray operator op(const value_type &lhs, const marray &rhs) { \ | ||
marray rtn; \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
rtn[i] = lhs op rhs[i]; \ | ||
} \ | ||
return rtn; \ | ||
} | ||
|
||
IMPL_ARITH_MARRAY_CPLX_OP(+) | ||
IMPL_ARITH_MARRAY_CPLX_OP(-) | ||
IMPL_ARITH_MARRAY_CPLX_OP(*) | ||
IMPL_ARITH_MARRAY_CPLX_OP(/) | ||
|
||
#undef IMPL_ARITH_MARRAY_CPLX_OP | ||
|
||
/// COMPARAISON OPERATORS | ||
|
||
#ifdef IMPL_COMP_MARRAY_CPLX_OP | ||
#error "Multiple definition of IMPL_COMP_MARRAY_CPLX_OP" | ||
#endif | ||
|
||
#define IMPL_COMP_MARRAY_CPLX_OP(op) \ | ||
friend marray<bool, NumElements> operator op(const marray & lhs, \ | ||
const marray & rhs) { \ | ||
marray<bool, NumElements> rtn; \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
rtn[i] = lhs[i] op rhs[i]; \ | ||
} \ | ||
return rtn; \ | ||
} \ | ||
\ | ||
friend marray<bool, NumElements> operator op(const marray & lhs, \ | ||
const value_type & rhs) { \ | ||
marray<bool, NumElements> rtn; \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
rtn[i] = lhs[i] op rhs; \ | ||
} \ | ||
return rtn; \ | ||
} \ | ||
\ | ||
friend marray<bool, NumElements> operator op(const value_type & lhs, \ | ||
const marray & rhs) { \ | ||
marray<bool, NumElements> rtn; \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
rtn[i] = lhs op rhs[i]; \ | ||
} \ | ||
return rtn; \ | ||
} | ||
|
||
IMPL_COMP_MARRAY_CPLX_OP(==) | ||
IMPL_COMP_MARRAY_CPLX_OP(!=) | ||
|
||
#undef IMPL_COMP_MARRAY_CPLX_OP | ||
}; | ||
|
||
} // namespace _V1 | ||
} // namespace sycl |
129 changes: 129 additions & 0 deletions
129
sycl/include/sycl/ext/oneapi/experimental/complex/detail/marray_math.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
//===- marray_math.hpp ----------------------------------------------------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "common.hpp" | ||
|
||
#include <sycl/marray.hpp> | ||
|
||
namespace sycl { | ||
inline namespace _V1 { | ||
|
||
namespace ext { | ||
namespace oneapi { | ||
namespace experimental { | ||
|
||
#ifdef ONE_ARG_MARRAY_TYPE | ||
#error "Multiple definition of ONE_ARG_MARRAY_TYPE" | ||
#endif | ||
#ifdef TWO_ARGS_MARRAY_TYPE | ||
#error "Multiple definition of TWO_ARGS_MARRAY_TYPE" | ||
#endif | ||
|
||
#ifdef TWO_ARGS_POLAR_S1_MARRAY_TYPE | ||
#error "Multiple definition of TWO_ARGS_POLAR_S1_MARRAY_TYPE" | ||
#endif | ||
#ifdef TWO_ARGS_POLAR_S2_MARRAY_TYPE | ||
#error "Multiple definition of TWO_ARGS_POLAR_S2_MARRAY_TYPE" | ||
#endif | ||
|
||
#ifdef TWO_ARGS_POW_S1_MARRAY_TYPE | ||
#error "Multiple definition of TWO_ARGS_POW_S1_MARRAY_TYPE" | ||
#endif | ||
#ifdef TWO_ARGS_POW_S2_MARRAY_TYPE | ||
#error "Multiple definition of TWO_ARGS_POW_S2_MARRAY_TYPE" | ||
#endif | ||
|
||
#ifdef MARRAY_CPLX_MATH_OP | ||
#error "Multiple definition of MARRAY_CPLX_MATH_OP" | ||
#endif | ||
|
||
// clang-format off | ||
#define ONE_ARG_MARRAY_TYPE(TYPE) const sycl::marray<TYPE, NumElements> &x | ||
#define TWO_ARGS_MARRAY_TYPE(TYPE1, TYPE2) const sycl::marray<TYPE1, NumElements> &x, const sycl::marray<TYPE2, NumElements> &y | ||
|
||
#define TWO_ARGS_POLAR_S1_MARRAY_TYPE(TYPE1, TYPE2) const sycl::marray<TYPE1, NumElements> &x, const TYPE2 &y = 0 | ||
#define TWO_ARGS_POLAR_S2_MARRAY_TYPE(TYPE1, TYPE2) const TYPE1 &x, const sycl::marray<TYPE2, NumElements> &y | ||
|
||
#define TWO_ARGS_POW_S1_MARRAY_TYPE(TYPE1, TYPE2) const sycl::marray<TYPE1, NumElements> &x, const TYPE2 &y | ||
#define TWO_ARGS_POW_S2_MARRAY_TYPE(TYPE1, TYPE2) const TYPE1 &x, const sycl::marray<TYPE2, NumElements> &y | ||
|
||
#define MARRAY_CPLX_MATH_OP(NUM_ARGS, RTN_TYPE, NAME, F, ...) \ | ||
template<typename T, std::size_t NumElements> \ | ||
_SYCL_EXT_CPLX_INLINE_VISIBILITY \ | ||
typename std::enable_if_t<is_genfloat<T>::value, sycl::marray<RTN_TYPE, NumElements>> \ | ||
NAME(NUM_ARGS##_MARRAY_TYPE(__VA_ARGS__)) { \ | ||
sycl::marray<RTN_TYPE, NumElements> rtn; \ | ||
for (std::size_t i = 0; i < NumElements; ++i) { \ | ||
rtn[i] = F; \ | ||
} \ | ||
return rtn; \ | ||
} | ||
|
||
// MARRAY_CPLX_MATH_OP(NUMBER_OF_ARGUMENTS, RETURN_TYPE, FUNCTION_NAME, FUNCTION_LOGIC, ARGUMENTS ... | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, T, abs, abs(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, T, arg, arg(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, T, arg, arg(x[i]), T); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, T, norm, norm(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, T, norm, norm(x[i]), T); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, conj, conj(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, conj, conj(x[i]), T); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, proj, proj(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, proj, proj(x[i]), T); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, log, log(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, log10, log10(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, sqrt, sqrt(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, exp, exp(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, asinh, asinh(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, acosh, acosh(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, atanh, atanh(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, sinh, sinh(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, cosh, cosh(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, tanh, tanh(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, asin, asin(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, acos, acos(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, atan, atan(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, sin, sin(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, cos, cos(x[i]), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, complex<T>, tan, tan(x[i]), complex<T>); | ||
|
||
MARRAY_CPLX_MATH_OP( ONE_ARG, T, real, x[i].real(), complex<T>); | ||
MARRAY_CPLX_MATH_OP( ONE_ARG, T, imag, x[i].imag(), complex<T>); | ||
|
||
MARRAY_CPLX_MATH_OP( TWO_ARGS, complex<T>, polar, polar(x[i], y[i]), T, T); | ||
MARRAY_CPLX_MATH_OP( TWO_ARGS_POLAR_S1, complex<T>, polar, polar(x[i], y), T, T); | ||
MARRAY_CPLX_MATH_OP( TWO_ARGS_POLAR_S2, complex<T>, polar, polar(x, y[i]), T, T); | ||
|
||
MARRAY_CPLX_MATH_OP( TWO_ARGS, complex<T>, pow, pow(x[i], y[i]), complex<T>, T); | ||
MARRAY_CPLX_MATH_OP( TWO_ARGS, complex<T>, pow, pow(x[i], y[i]), complex<T>, complex<T>); | ||
MARRAY_CPLX_MATH_OP( TWO_ARGS, complex<T>, pow, pow(x[i], y[i]), T, complex<T>); | ||
|
||
MARRAY_CPLX_MATH_OP( TWO_ARGS_POW_S1, complex<T>, pow, pow(x[i], y), complex<T>, T); | ||
MARRAY_CPLX_MATH_OP( TWO_ARGS_POW_S1, complex<T>, pow, pow(x[i], y), complex<T>, complex<T>); | ||
MARRAY_CPLX_MATH_OP( TWO_ARGS_POW_S1, complex<T>, pow, pow(x[i], y), T, complex<T>); | ||
|
||
MARRAY_CPLX_MATH_OP( TWO_ARGS_POW_S2, complex<T>, pow, pow(x, y[i]), complex<T>, T); | ||
MARRAY_CPLX_MATH_OP( TWO_ARGS_POW_S2, complex<T>, pow, pow(x, y[i]), complex<T>, complex<T>); | ||
MARRAY_CPLX_MATH_OP( TWO_ARGS_POW_S2, complex<T>, pow, pow(x, y[i]), T, complex<T>); | ||
// clang-format on | ||
|
||
#undef ONE_ARG_MARRAY_TYPE | ||
#undef TWO_ARGS_MARRAY_TYPE | ||
#undef TWO_ARGS_POLAR_S1_MARRAY_TYPE | ||
#undef TWO_ARGS_POLAR_S2_MARRAY_TYPE | ||
#undef TWO_ARGS_POW_S1_MARRAY_TYPE | ||
#undef TWO_ARGS_POW_S2_MARRAY_TYPE | ||
#undef MARRAY_CPLX_MATH_OP | ||
|
||
} // namespace experimental | ||
} // namespace oneapi | ||
} // namespace ext | ||
|
||
} // namespace _V1 | ||
} // namespace sycl | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aelovikov-intel - With the builtin refactoring, can we reuse some of the new tooling for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say the
NUM_ARGS
macro parameter approach looks promising, although that's more of an idiom than tooling. Having amarray_map
helper would remove some code duplication as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the builtins and explained the details in my last comment