Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first column in a single-precision complex floating-point input matrix which has the same elements as a provided search vector.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {string} order - storage layout
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first column in a single-precision complex floating-point input matrix which has the same elements as a provided search vector using alternative indexing semantics.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
* @param {Complex64Array} A - input matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first row in a single-precision complex floating-point input matrix which has the same elements as a provided search vector.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching row, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored.
*
* @param {string} order - storage layout
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first row in a single-precision complex floating-point input matrix which has the same elements as a provided search vector using alternative indexing semantics.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching row, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
* @param {Complex64Array} A - input matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the last row in a single-precision complex floating-point input matrix which has the same elements as a provided search vector.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching row, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored.
*
* @param {string} order - storage layout
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the last row in a single-precision complex floating-point input matrix which has the same elements as a provided search vector using alternative indexing semantics.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching row, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
* @param {Complex64Array} A - input matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ int main( void ) {
iter = ITERATIONS / (int)pow( 10, i-1 );
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:len=%d\n", NAME, len );
printf( "# c::%s:len=%d\n", NAME, len );
elapsed = benchmark1( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
}
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:ndarray:len=%d\n", NAME, len );
printf( "# c::%s:ndarray:len=%d\n", NAME, len );
elapsed = benchmark2( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ int main( void ) {
iter = ITERATIONS / (int) pow( 10, i-1 );
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:len=%d\n", NAME, len );
printf( "# c::%s:len=%d\n", NAME, len );
elapsed = benchmark1( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
}
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:ndarray:len=%d\n", NAME, len );
printf( "# c::%s:ndarray:len=%d\n", NAME, len );
elapsed = benchmark2( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ int main( void ) {
iter = ITERATIONS / (int)pow( 10, i-1 );
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:len=%d\n", NAME, len );
printf( "# c::%s:len=%d\n", NAME, len );
elapsed = benchmark1( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
}
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:ndarray:len=%d\n", NAME, len );
printf( "# c::%s:ndarray:len=%d\n", NAME, len );
elapsed = benchmark2( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ var addon = require( './../src/addon.node' );
/**
* Computes the Cartesian square for a double-precision floating-point strided array using alternative indexing semantics.
*
* ## Notes
*
* - Pairs are stored as rows in the output matrix, where the first column contains the first element of each pair and the second column contains the second element.
*
* @param {NonNegativeInteger} N - number of indexed elements
* @param {Float64Array} x - input array
* @param {integer} strideX - stride length for `x`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ var addon = require( './../src/addon.node' );
/**
* Circularly shifts the elements of a double-precision floating-point strided array by a specified number of positions using alternative indexing semantics.
*
* ## Notes
*
* - This implementation is based on the "trinity rotation" (a.k.a., conjoined triple reversal) algorithm introduced in <https://github.com/scandum/rotate/tree/6d0d2d56d10454def027e35921890200b45fe82c>, by Igor van den Hoven.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {integer} k - number of positions to shift
* @param {Float64Array} x - input array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first column in a double-precision floating-point input matrix which has the same elements as a provided search vector.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {string} order - storage layout
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first column in a double-precision floating-point input matrix which has the same elements as a provided search vector using alternative indexing semantics.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
* @param {Float64Array} A - input matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first row in a double-precision floating-point input matrix which has the same elements as a provided search vector.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching row, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored.
*
* @param {string} order - storage layout
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first row in a double-precision floating-point input matrix which has the same elements as a provided search vector using alternative indexing semantics.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching row, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
* @param {Float64Array} A - input matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the last row in a double-precision floating-point input matrix which has the same elements as a provided search vector.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching row, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored.
*
* @param {string} order - storage layout
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the last row in a double-precision floating-point input matrix which has the same elements as a provided search vector using alternative indexing semantics.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching row, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
* @param {Float64Array} A - input matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ var addon = require( './../src/addon.node' );
/**
* Sifts a value down from a specified index in a double-precision floating-point strided min-heap until the heap property is restored.
*
* ## Notes
*
* - The function assumes that the subtrees rooted at the children of `index` already satisfy the min-heap property and only the value being sifted may violate the min-heap invariant.
* - The min-heap algorithm is sensitive to the presence of `NaN` values. Since `NaN` comparisons always return `false`, if `NaN` values are present in the input array, the results may be unpredictable.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {NonNegativeInteger} index - logical index at which to begin sifting
* @param {number} value - value to place into the heap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ var addon = require( './../src/addon.node' );
/**
* Sifts a value down from a specified index in a double-precision floating-point strided min-heap until the heap property is restored using alternative indexing semantics.
*
* ## Notes
*
* - The function assumes that the subtrees rooted at the children of `index` already satisfy the min-heap property and only the value being sifted may violate the min-heap invariant.
* - The min-heap algorithm is sensitive to the presence of `NaN` values. Since `NaN` comparisons always return `false`, if `NaN` values are present in the input array, the results may be unpredictable.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {NonNegativeInteger} index - logical index at which to begin sifting
* @param {number} value - value to place into the heap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ int main( void ) {
iter = ITERATIONS / pow( 10, i-1 );
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:len=%d\n", NAME, len );
printf( "# c::%s:len=%d\n", NAME, len );
elapsed = benchmark1( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
Expand All @@ -194,7 +194,7 @@ int main( void ) {
iter = ITERATIONS / pow( 10, i-1 );
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:ndarray:len=%d\n", NAME, len );
printf( "# c::%s:ndarray:len=%d\n", NAME, len );
elapsed = benchmark2( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ int main( void ) {
iter = ITERATIONS / (int)pow( 10, i-1 );
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:len=%d\n", NAME, len );
printf( "# c::%s:len=%d\n", NAME, len );
elapsed = benchmark1( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
}
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:ndarray:len=%d\n", NAME, len );
printf( "# c::%s:ndarray:len=%d\n", NAME, len );
elapsed = benchmark2( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ int main( void ) {
iter = ITERATIONS / (int) pow( 10, i-1 );
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:len=%d\n", NAME, len );
printf( "# c::%s:len=%d\n", NAME, len );
elapsed = benchmark1( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
}
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:ndarray:len=%d\n", NAME, len );
printf( "# c::%s:ndarray:len=%d\n", NAME, len );
elapsed = benchmark2( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ int main( void ) {
iter = ITERATIONS / (int)pow( 10, i-1 );
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:len=%d\n", NAME, len );
printf( "# c::%s:len=%d\n", NAME, len );
elapsed = benchmark1( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
}
for ( j = 0; j < REPEATS; j++ ) {
count += 1;
printf( "# c::native::%s:ndarray:len=%d\n", NAME, len );
printf( "# c::%s:ndarray:len=%d\n", NAME, len );
elapsed = benchmark2( iter, len );
print_results( iter, elapsed );
printf( "ok %d benchmark finished\n", count );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ var addon = require( './../src/addon.node' );
/**
* Computes the Cartesian square for a single-precision floating-point strided array using alternative indexing semantics.
*
* ## Notes
*
* - Pairs are stored as rows in the output matrix, where the first column contains the first element of each pair and the second column contains the second element.
*
* @param {NonNegativeInteger} N - number of indexed elements
* @param {Float32Array} x - input array
* @param {integer} strideX - stride length for `x`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ var addon = require( './../src/addon.node' );
/**
* Circularly shifts the elements of a single-precision floating-point strided array by a specified number of positions using alternative indexing semantics.
*
* ## Notes
*
* - This implementation is based on the "trinity rotation" (a.k.a., conjoined triple reversal) algorithm introduced in <https://github.com/scandum/rotate/tree/6d0d2d56d10454def027e35921890200b45fe82c>, by Igor van den Hoven.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {integer} k - number of positions to shift
* @param {Float32Array} x - input array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first column in a single-precision floating-point input matrix which has the same elements as a provided search vector using alternative indexing semantics.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
* @param {Float32Array} A - input matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first column in a single-precision floating-point input matrix which has the same elements as a provided search vector.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
*
* @param {string} order - storage layout
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ var addon = require( './../src/addon.node' );
/**
* Returns the index of the first row in a single-precision floating-point input matrix which has the same elements as a provided search vector using alternative indexing semantics.
*
* ## Notes
*
* - If the function is provided an empty matrix or if the function is unable to find a matching row, the function returns `-1` (i.e., an invalid index).
* - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored.
*
* @param {PositiveInteger} M - number of rows in `A`
* @param {PositiveInteger} N - number of columns in `A`
* @param {Float32Array} A - input matrix
Expand Down
Loading
Loading