Skip to content

Commit 184334f

Browse files
authored
Merge pull request #293 from mhoemmen/P3371R1
Implement P3371
2 parents 8b62a13 + 160e5ac commit 184334f

23 files changed

+4673
-439
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ option(LINALG_FIX_TRANSPOSED_FOR_PADDED_LAYOUTS "Enable implementation of P3222
2727

2828
option(LINALG_FIX_CONJUGATED_FOR_NONCOMPLEX "Enable implementation of P3050 (Fix conjugated for noncomplex value types). OFF by default, though this will change if P3050 is voted into the C++ Standard Working Draft." OFF)
2929

30+
option(LINALG_FIX_RANK_UPDATES "Enable implementation of P3371 (Fix C++26 by making the rank-1, rank-2, rank-k, and rank-2k updates consistent with the BLAS). OFF by default, though this will change if P3371 is voted into the C++ Standard Working Draft." OFF)
31+
3032
################################################################################
3133

3234
# Decide on the standard to use

include/experimental/__p1673_bits/blas1_givens.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ struct is_custom_apply_givens_rotation_avail<
8484
: std::true_type{};
8585
} // end anonymous namespace
8686

87-
MDSPAN_TEMPLATE_REQUIRES( class Real, /* requires */ ( _MDSPAN_TRAIT(std::is_floating_point, Real) ) )
87+
MDSPAN_TEMPLATE_REQUIRES( class Real, /* requires */ ( MDSPAN_IMPL_TRAIT(std::is_floating_point, Real) ) )
8888
void setup_givens_rotation(const Real f,
8989
const Real g,
9090
Real& cs,
@@ -190,7 +190,7 @@ void setup_givens_rotation(const Real f,
190190
}
191191

192192
namespace impl {
193-
MDSPAN_TEMPLATE_REQUIRES( class Real, /* requires */ ( _MDSPAN_TRAIT(std::is_floating_point, Real) ) )
193+
MDSPAN_TEMPLATE_REQUIRES( class Real, /* requires */ ( MDSPAN_IMPL_TRAIT(std::is_floating_point, Real) ) )
194194
Real abs1(const std::complex<Real>& ff) {
195195
using std::abs;
196196
using std::imag;
@@ -200,7 +200,7 @@ Real abs1(const std::complex<Real>& ff) {
200200
return max(abs(real(ff)), abs(imag(ff)));
201201
}
202202

203-
MDSPAN_TEMPLATE_REQUIRES( class Real, /* requires */ ( _MDSPAN_TRAIT(std::is_floating_point, Real) ) )
203+
MDSPAN_TEMPLATE_REQUIRES( class Real, /* requires */ ( MDSPAN_IMPL_TRAIT(std::is_floating_point, Real) ) )
204204
Real abssq(const std::complex<Real>& ff) {
205205
using std::imag;
206206
using std::real;
@@ -209,7 +209,7 @@ Real abssq(const std::complex<Real>& ff) {
209209
}
210210
}
211211

212-
MDSPAN_TEMPLATE_REQUIRES( class Real, /* requires */ ( _MDSPAN_TRAIT(std::is_floating_point, Real) ) )
212+
MDSPAN_TEMPLATE_REQUIRES( class Real, /* requires */ ( MDSPAN_IMPL_TRAIT(std::is_floating_point, Real) ) )
213213
void setup_givens_rotation(const std::complex<Real>& f,
214214
const std::complex<Real>& g,
215215
Real& cs,
@@ -358,7 +358,7 @@ MDSPAN_TEMPLATE_REQUIRES(
358358
class Layout2,
359359
class Accessor2,
360360
class Real,
361-
/* requires */ (_MDSPAN_TRAIT(std::is_floating_point, Real))
361+
/* requires */ (MDSPAN_IMPL_TRAIT(std::is_floating_point, Real))
362362
)
363363
void apply_givens_rotation(
364364
impl::inline_exec_t&& /* exec */,
@@ -393,7 +393,7 @@ MDSPAN_TEMPLATE_REQUIRES(
393393
class Layout2,
394394
class Accessor2,
395395
class Real,
396-
/* requires */ (_MDSPAN_TRAIT(std::is_floating_point, Real))
396+
/* requires */ (MDSPAN_IMPL_TRAIT(std::is_floating_point, Real))
397397
)
398398
void apply_givens_rotation(
399399
ExecutionPolicy&& exec,
@@ -427,7 +427,7 @@ MDSPAN_TEMPLATE_REQUIRES(
427427
class Layout2,
428428
class Accessor2,
429429
class Real,
430-
/* requires */ (_MDSPAN_TRAIT(std::is_floating_point, Real))
430+
/* requires */ (MDSPAN_IMPL_TRAIT(std::is_floating_point, Real))
431431
)
432432
void apply_givens_rotation(
433433
mdspan<ElementType1, extents<SizeType1, ext1>, Layout1, Accessor1> x,
@@ -453,7 +453,7 @@ MDSPAN_TEMPLATE_REQUIRES(
453453
class Layout2,
454454
class Accessor2,
455455
class Real,
456-
/* requires */ (_MDSPAN_TRAIT(std::is_floating_point, Real))
456+
/* requires */ (MDSPAN_IMPL_TRAIT(std::is_floating_point, Real))
457457
)
458458
void apply_givens_rotation(
459459
impl::inline_exec_t&& /* exec */,
@@ -489,7 +489,7 @@ MDSPAN_TEMPLATE_REQUIRES(
489489
class Layout2,
490490
class Accessor2,
491491
class Real,
492-
/* requires */ (_MDSPAN_TRAIT(std::is_floating_point, Real))
492+
/* requires */ (MDSPAN_IMPL_TRAIT(std::is_floating_point, Real))
493493
)
494494
void apply_givens_rotation(
495495
ExecutionPolicy&& exec,
@@ -522,7 +522,7 @@ MDSPAN_TEMPLATE_REQUIRES(
522522
class Layout2,
523523
class Accessor2,
524524
class Real,
525-
/* requires */ (_MDSPAN_TRAIT(std::is_floating_point, Real))
525+
/* requires */ (MDSPAN_IMPL_TRAIT(std::is_floating_point, Real))
526526
)
527527
void apply_givens_rotation(
528528
mdspan<ElementType1, extents<SizeType1, ext1>, Layout1, Accessor1> x,

0 commit comments

Comments
 (0)