Skip to content

Commit c4c59f7

Browse files
committed
rm unused multiply
1 parent cb496ca commit c4c59f7

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

inc/zoo/swar/associative_iteration.h

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -411,36 +411,6 @@ constexpr auto associativeOperatorIterated_regressive(
411411
return result;
412412
}
413413

414-
415-
// What I don't understand is why this doesn't work?
416-
template <typename T>
417-
constexpr auto multiply(T a , T b) {
418-
auto operation = [](auto left, auto right, auto count) {
419-
if (count) {
420-
return left + right;
421-
} else {
422-
return left;
423-
}
424-
};
425-
426-
auto updateCount = [](auto count) {
427-
return count << 1;
428-
};
429-
430-
constexpr auto numBits = sizeof(T) * 8;
431-
return associativeOperatorIterated_regressive(
432-
a, // base
433-
0, // neutral
434-
b, // count
435-
1, // forSquaring, pretty sure this is where i am not understanding
436-
operation, // operation
437-
numBits, // log2Count
438-
updateCount // halver
439-
);
440-
}
441-
442-
// static_assert(multiply(3, 4) == 12, "multiply failed");
443-
444414
template<int ActualBits, int NB, typename T>
445415
constexpr auto multiplication_OverflowUnsafe_SpecificBitCount(
446416
SWAR<NB, T> multiplicand, SWAR<NB, T> multiplier

0 commit comments

Comments
 (0)