Previous commit
Next commit
chore: minor clean-up
Signed-off-by: Shabareesh Shetty <[email protected]>
  • Loading branch information
@ShabiShett07
ShabiShett07 authoredJun 13, 2025
commit ea01d64861a6143ade8c9db87128deade61998b7
Original file line numberDiff line numberDiff line change
Expand Up@@ -95,7 +95,7 @@ tape( 'the function supports an `x` stride', function test( t ) {
-4,
-7,
-1, // 1
-9, // 1
-9, // 1
2,
-8
]);
Expand All@@ -115,39 +115,6 @@ tape( 'the function supports an `x` stride', function test( t ) {
t.end();
});

tape( 'the function supports complex access patterns', function test( t ) {
var expected;
var dot;
var x;
var y;

x = new Complex128Array([
7, // 0
-8, // 0
-4,
-7,
-1, // 1
-9, // 1
2,
-8
]);
y = new Complex128Array([
6, // 1
-6, // 1
-9, // 0
5, // 0
7,
-6,
1,
-5
]);
expected = new Complex128( -55, 23 );

dot = zdotc( 2, x, 2, y, -1 );
t.deepEqual( dot, expected, 'returns expected value' );
t.end();
});

tape( 'the function supports an `y` stride', function test( t ) {
var expected;
var dot;
Expand DownExpand Up@@ -213,3 +180,36 @@ tape( 'the function supports negative strides', function test( t ) {
t.deepEqual( dot, expected, 'returns expected value' );
t.end();
});

tape( 'the function supports complex access patterns', function test( t ) {
var expected;
var dot;
var x;
var y;

x = new Complex128Array([
7, // 0
-8, // 0
-4,
-7,
-1, // 1
-9, // 1
2,
-8
]);
y = new Complex128Array([
6, // 1
-6, // 1
-9, // 0
5, // 0
7,
-6,
1,
-5
]);
expected = new Complex128( -55, 23 );

dot = zdotc( 2, x, 2, y, -1 );
t.deepEqual( dot, expected, 'returns expected value' );
t.end();
});
Loading