Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "blas/sswap/docs/types/index.d"

Index

Functions

Functions

sswap

  • Interchanges two single-precision floating-point vectors.

    throws

    first argument must be a 1-dimensional ndarray containing single-precision floating-point numbers

    throws

    second argument must be a 1-dimensional ndarray containing single-precision floating-point numbers

    throws

    input arrays must be the same length

    Parameters

    Returns ndarray

    y

    Example

    var Float32Array = require( `@stdlib/array/float32` );
    var array = require( `@stdlib/ndarray/array` );
    
    var x = array( new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );
    var y = array( new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );
    
    sswap( x, y );
    
    var xbuf = x.data;
    // returns <Float32Array>[ 2.0, 6.0, -1.0, -4.0, 8.0 ]
    
    var ybuf = y.data;
    // returns <Float32Array>[ 4.0, 2.0, -3.0, 5.0, -1.0 ]