Skip to content

Commit

Permalink
docs: clean-up C function parameter and return annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Mar 17, 2024
1 parent a7fdd40 commit 28433d6
Show file tree
Hide file tree
Showing 30 changed files with 34 additions and 42 deletions.
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/ddot/src/ddot.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns the dot product
* @return the dot product
*/
double c_ddot( const int N, const double *X, const int strideX, const double *Y, const int strideY ) {
double dot;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/ddot/src/ddot_cblas.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns the dot product
* @return the dot product
*/
double c_ddot( const int N, const double *X, const int strideX, const double *Y, const int strideY ) {
return cblas_ddot( N, X, strideX, Y, strideY );
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/ddot/src/ddot_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns the dot product
* @return the dot product
*/
double c_ddot( const int N, const double *X, const int strideX, const double *Y, const int strideY ) {
double dot;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/dsdot/src/dsdot.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns the dot product
* @return the dot product
*/
double c_dsdot( const int N, const float *X, const int strideX, const float *Y, const int strideY ) {
double dot;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/dsdot/src/dsdot_cblas.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns the dot product
* @return the dot product
*/
double c_dsdot( const int N, const float *X, const int strideX, const float *Y, const int strideY ) {
return cblas_dsdot( N, X, strideX, Y, strideY );
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/dsdot/src/dsdot_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns the dot product
* @return the dot product
*/
double c_dsdot( const int N, const float *X, const int strideX, const float *Y, const int strideY ) {
double dot;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/sdot/src/sdot.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns the dot product
* @return the dot product
*/
float c_sdot( const int N, const float *X, const int strideX, const float *Y, const int strideY ) {
float dot;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/sdot/src/sdot_cblas.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns the dot product
* @return the dot product
*/
float c_sdot( const int N, const float *X, const int strideX, const float *Y, const int strideY ) {
return cblas_sdot( N, X, strideX, Y, strideY );
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/sdot/src/sdot_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns the dot product
* @return the dot product
*/
float c_sdot( const int N, const float *X, const int strideX, const float *Y, const int strideY ) {
float dot;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/sdsdot/src/sdsdot.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns dot product
* @return dot product
*/
float c_sdsdot( const int N, const float scalar, const float *X, const int strideX, const float *Y, const int strideY ) {
double dot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns dot product
* @return dot product
*/
float c_sdsdot( const int N, const float scalar, const float *X, const int strideX, const float *Y, const int strideY ) {
return cblas_sdsdot( N, scalar, X, strideX, Y, strideY );
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/sdsdot/src/sdsdot_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @param strideX X stride length
* @param Y second array
* @param strideY Y stride length
* @returns dot product
* @return dot product
*/
float c_sdsdot( const int N, const float scalar, const float *X, const int strideX, const float *Y, const int strideY ) {
float dot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ double rand_double() {
* Tests if a numeric value is negative zero.
*
* @param x value to test
* @returns boolean indicating if a numeric value is negative zero
* @return boolean indicating if a numeric value is negative zero
*/
bool is_negative_zero( double x ) {
return ( 1.0/x == -HUGE_VAL );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ float rand_float() {
* Tests if a numeric value is negative zero.
*
* @param x value to test
* @returns boolean indicating if a numeric value is negative zero
* @return boolean indicating if a numeric value is negative zero
*/
bool is_negative_zerof( float x ) {
return ( x == 0.0f && 1.0f/x == -INFINITY );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ double rand_double() {
* Tests if a numeric value is positive zero.
*
* @param x value to test
* @returns boolean indicating if a numeric value is positive zero
* @return boolean indicating if a numeric value is positive zero
*/
bool is_positive_zero( double x ) {
return ( 1.0/x == HUGE_VAL );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ float rand_float() {
* Tests if a numeric value is positive zero.
*
* @param x value to test
* @returns boolean indicating if a numeric value is positive zero
* @return boolean indicating if a numeric value is positive zero
*/
bool is_positive_zerof( float x ) {
return ( x == 0.0f && 1.0f/x == INFINITY );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Computes the arccosine (in degrees) of a double-precision floating-point number.
*
* @param x input value
* @returns arccosine (in degrees)
* @return arccosine (in degrees)
*
* @example
* double v = stdlib_base_acosd( 0.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Computes the arccotangent (in degrees) of a double-precision floating-point number.
*
* @param x input value
* @returns arccotangent (in degrees)
* @return arccotangent (in degrees)
*
* @example
* double v = stdlib_base_acotd( 0.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Computes the arcsecant (in degrees) of a double-precision floating-point number.
*
* @param x input value
* @returns arcsecant (in degrees)
* @return arcsecant (in degrees)
*
* @example
* double v = stdlib_base_asecd( 1.0 );
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/math/base/special/asind/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
/**
* Computes the arcsine (in degrees) of a double-precision floating-point number.
*
* @param x - input value
* @returns arcsine (in degrees)
* @param x input value
* @return arcsine (in degrees)
*
* @example
* double v = stdlib_base_acotd( 0.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ int32_t MAX_BERNOULLI = 258;
* Computes the nth Bernoulli number.
*
* @param n input value
* @returns output value
* @return output value
*
* @example
* double out = stdlib_base_bernoulli( 0 );
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/cbrt/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static const double P4 = 0.145996192886612446982; // 0x3fc2b000, 0xd4e4edd7
* [horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method
*
* @param x value at which to evaluate the polynomial
* @returns evaluated polynomial
* @return evaluated polynomial
*/
static double polval( const double x ) {
if ( x == 0.0 ) {
Expand Down
16 changes: 4 additions & 12 deletions lib/node_modules/@stdlib/math/base/special/csch/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,16 @@
/**
* Computes the hyperbolic cosecant of a number.
*
* @param {number} x - input value
* @returns {number} hyperbolic cosecant
* @param x input value
* @return hyperbolic cosecant
*
* @example
* var v = csch( 0.0 );
* // returns Infinity
*
* @example
* var v = csch( 2.0 );
* var v = stdlib_base_csch( 2.0 );
* // returns ~0.2757
*
* @example
* var v = csch( -2.0 );
* var v = stdlib_base_csch( -2.0 );
* // returns ~-0.2757
*
* @example
* var v = csch( NaN );
* // returns NaN
*/
double stdlib_base_csch( const double x ) {
return 1.0 / stdlib_base_sinh( x );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Computes the hyperbolic arccosine of a number.
*
* @param x input value
* @returns hyperbolic arccosine (in radians)
* @return hyperbolic arccosine (in radians)
*
* @example
* double v = stdlib_base_fast_acosh( 1.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @param x number
* @param y number
* @returns hypotenuse
* @return hypotenuse
*
* @example
* double h = stdlib_base_fast_hypot( -5.0, 12.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* Returns the integer corresponding to the unbiased exponent of a single-precision floating-point number.
*
* @param x input value
* @returns unbiased exponent
* @return unbiased exponent
*
* @example
* #include <stdint.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Returns the integer corresponding to the significand of a single-precision floating-point number.
*
* @param x input value
* @returns integer corresponding to the significand
* @return integer corresponding to the significand
*
* @example
* #include <stdint.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* Returns the integer corresponding to the unbiased exponent of a double-precision floating-point number.
*
* @param x input value
* @returns unbiased exponent
* @return unbiased exponent
*
* @example
* #include <stdint.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void print_results( double elapsed ) {
/**
* Returns a clock time.
*
* @returns clock time
* @return clock time
*/
double tic() {
struct timeval now;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void print_results( double elapsed ) {
/**
* Returns a clock time.
*
* @returns clock time
* @return clock time
*/
double tic() {
struct timeval now;
Expand Down

0 comments on commit 28433d6

Please sign in to comment.