function axisSum( x, nrows, ncols, axis ) {
	var offset;
	var out;
	var dx0;
	var dx1;
	var S0;
	var S1;
	var i1;

	// Resolve loop variables...
	if ( axis === 0 ) {
		// Sum across rows...
		S0 = ncols;
		S1 = nrows;
		dx0 = 1;
		dx1 = ncols;
	} else { // axis === 1
		// Sum down columns...
		S0 = nrows;
		S1 = ncols;
		dx0 = ncols;
		dx1 = 1;
	}
	out = new Float64Array( S1 );
	offset = 0;
	for ( i1 = 0; i1 < S1; i1++ ) {
		out[ i1 ] = dsumpw.ndarray( S0, x, dx0, offset );
		offset += dx1;
	}
	return out;
}
Computes a sum along an axis.

@private
@param {Float64Array} x - strided array
@param {NonNegativeInteger} nrows - number of rows
@param {NonNegativeInteger} ncols - number of columns
@param {NonNegativeInteger} axis - axis (0: sum across the rows; 1: sum down the columns)
@returns {Float64Array} results

@example
var Float64Array = require( '@stdlib/array/float64' );

// 2x3: [ [ 1.0, 2.0, 3.0 ], [ 4.0, 5.0, 6.0 ] ]
var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );

var rsums = axisSum( x, 2, 3, 0 );
// returns <Float64Array>[ 6.0, 15.0 ]

var csums = axisSum( x, 2, 3, 1 );
// returns <Float64Array>[ 5.0, 7.0, 9.0 ]