function idamax( N, x, strideX, offsetX ) {
	var dmax;
	var idx;
	var ix;
	var v;
	var i;

	if ( N < 1 ) {
		return -1;
	}
	idx = 0;
	if ( N === 1 ) {
		return idx;
	}
	dmax = abs( x[ offsetX ] );
	ix = offsetX + strideX;
	for ( i = 1; i < N; i++ ) {
		v = abs( x[ ix ] );
		if ( v > dmax ) {
			idx = i;
			dmax = v;
		}
		ix += strideX;
	}
	return idx;
}
Finds the index of the first element having the maximum absolute value.

@param {PositiveInteger} N - number of indexed elements
@param {Float64Array} x - input array
@param {integer} strideX - `x` stride length
@param {NonNegativeInteger} offsetX - starting index for `x`
@returns {integer} index value

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

var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );

var idx = idamax( x.length, x, 1, 0 );
// returns 4