Skip to content

feat: add blas/base/drot #1823

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

Merged
merged 27 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ccd0c39
chore: in-process
aman-095 Mar 10, 2024
64788f5
feat: add BLAS Level 1 drot routine
aman-095 Mar 11, 2024
e064ac3
chore: apply error changes
aman-095 Mar 11, 2024
9960599
chore: solve lint error
aman-095 Mar 11, 2024
37dd267
chore: apply changes for lint error and tests
aman-095 Mar 11, 2024
de92f4a
chore: apply readme changes
aman-095 Mar 12, 2024
9e371a5
chore: apply review changes
aman-095 Mar 12, 2024
25d7542
Apply suggestions from code review
kgryte Mar 14, 2024
18681d4
Apply suggestions from code review
kgryte Mar 14, 2024
df45a1a
Apply suggestions from code review
kgryte Mar 14, 2024
7fb5d2c
Apply suggestions from code review
kgryte Mar 14, 2024
fec516f
Apply suggestions from code review
kgryte Mar 14, 2024
fd7978d
chore: apply review changes
aman-095 Mar 14, 2024
639ea83
chore: apply review changes
aman-095 Mar 14, 2024
e18d183
chore: apply review changes
aman-095 Mar 14, 2024
4cf3434
Apply suggestions from code review
kgryte Mar 15, 2024
1f34b38
Apply suggestions from code review
kgryte Mar 15, 2024
bd544ea
chore: apply review changes
aman-095 Mar 15, 2024
47361ef
chore: apply suggestions from code review
Pranavchiku Mar 16, 2024
21002f9
chore: apply review changes
aman-095 Mar 17, 2024
3c73b2c
chore: apply review changes
aman-095 Mar 25, 2024
e005888
chore: apply review changes
aman-095 Mar 26, 2024
23b03d1
feat: add C / Fortran implementation for drot
aman-095 Apr 12, 2024
7e37513
chore: apply review changes
aman-095 Apr 12, 2024
818ede6
chore: resolve lint errors
aman-095 Apr 12, 2024
c8e7dea
refactor: replace use of 'double precision' and update tests
kgryte Apr 19, 2024
43f62d8
docs: update example
kgryte Apr 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: solve lint error
  • Loading branch information
aman-095 committed Mar 11, 2024
commit 9960599594f6494d8527bb98102bc58a3804589c
41 changes: 20 additions & 21 deletions lib/node_modules/@stdlib/blas/base/drot/docs/repl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
{{alias}}( N, x, strideX, y, strideY, c, s )
Applies a plane rotation.

The `N` and stride parameters determine how values from `x` and `y` are rotated.
The `N` and stride parameters determine how values
from `x` and `y` are rotated.

Indexing is relative to the first index. To introduce an offset, use typed
array views.
Expand All @@ -27,10 +28,10 @@
Index increment for `y`.

c: float
cosine of angle for rotation.
Cosine of angle for rotation.

s: float
sin of angle for rotation.
Sin of angle for rotation.

Returns
-------
Expand All @@ -39,22 +40,21 @@

Examples
--------
// Standard usage:
// Standard Usage:
> var x = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
> var y = new {{alias:@stdlib/array/float64}}( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
> {{alias}}( x.length, x, 1, y, 1, 0.707, 0.707 )
<Float64Array>[ 3.535, 3.535, 3.5349999999999997, 3.5349999999999997, 3.5349999999999997 ]
> {{alias}}( x.length, x, 1, y, 1, 1.0, 0.0 )
<Float64Array>[ 6.0, 7.0, 8.0, 9.0, 10.0 ]

// Advanced indexing:
// Advanced Indexing:
> x = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
> y = new {{alias:@stdlib/array/float64}}( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
> {{alias}}( 2, x, -2, y, 1, 0.707, 0.707 )
<Float64Array>[ 6.0, 2.121, 4.242, 9.0, 10.0 ]
> {{alias}}( 2, x, -1, y, 2, 0.707, 0.707 )
<Float64Array>[ 2.8280000000000003, 7.0, 4.949, 9.0, 10.0 ]


{{alias}}.ndarray( N, x, strideX, offsetX, y, strideY, offsetY )
Interchanges two double-precision floating-point vectors using alternative
indexing semantics.
{{alias}}.ndarray( N, x, strideX, offsetX, y, strideY, offsetY, c, s )
Applies a plane rotation.

While typed array views mandate a view offset based on the underlying
buffer, the offset parameters support indexing semantics based on starting
Expand Down Expand Up @@ -84,10 +84,10 @@
Starting index for `y`.

c: float
cosine of angle for rotation.
Cosine of angle for rotation.

s: float
sin of angle for rotation.
Sin of angle for rotation.

Returns
-------
Expand All @@ -96,18 +96,17 @@

Examples
--------
// Standard usage:
// Standard Usage:
> var x = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
> var y = new {{alias:@stdlib/array/float64}}( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
> {{alias}}.ndarray( x.length, x, 1, 0, y, 1, 0, 0.707, 0.707 )
<Float64Array>[ 3.535, 3.535, 3.5349999999999997, 3.5349999999999997, 3.5349999999999997 ]
> {{alias}}.ndarray( x.length, x, 1, 0, y, 1, 0, 1.0, 0.0 )
<Float64Array>[ 6.0, 7.0, 8.0, 9.0, 10.0 ]

// Advanced indexing:
// Advanced Indexing:
> x = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
> y = new {{alias:@stdlib/array/float64}}( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
> {{alias}}.ndarray( 2, x, 1, 0, y, 1, 2, 0.707, 0.707 )
<Float64Array>[ 6.0, 7.0, 4.949, 4.949, 10.0 ]
> {{alias}}.ndarray( 4, x, 1, 5, y, -5, 2, 0.707, 0.707 )
<Float64Array>[ 7.0, 8.0, 2.1209999999999996, 10.0, 11.0, 12.0 ]

See Also
--------

4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/base/drot/test/test.drot.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ tape( 'the function supports negative strides', function test( t ) {

drot( N, x, -1, y, 2, 0.707, 0.707 );

xe = new Float64Array( [ 6.3629999999999995, 5.656, 3, 4, 5 ] );
ye = new Float64Array( [ 2.8280000000000003, 7, 4.949, 9, 10 ] );
xe = new Float64Array( [ 6.3629999999999995, 5.656, 3.0, 4.0, 5.0 ] );
ye = new Float64Array( [ 2.8280000000000003, 7.0, 4.949, 9.0, 10.0 ] );

t.deepEqual( x, xe, 'returns expected value' );
t.deepEqual( y, ye, 'returns expected value' );
Expand Down