function setUpper( M, N, areal, aimag, breal, bimag, A, strideA1, strideA2, offsetA ) { // eslint-disable-line max-len
	var idx;
	var ia;
	var i0;
	var i1;

	ia = offsetA;
	if ( isRowMajor( [ strideA1, strideA2 ] ) ) {
		for ( i1 = 0; i1 < M; i1++ ) {
			idx = ia + ( i1*strideA2 );
			for ( i0 = i1; i0 < N; i0++ ) {
				A[ idx ] = areal;
				A[ idx+1 ] = aimag;
				idx += strideA2;
			}
			ia += strideA1;
		}
		setDiagonal( M, N, breal, bimag, A, strideA1, strideA2, offsetA );
		return A;
	}
	for ( i1 = 0; i1 < N; i1++ ) {
		idx = ia;
		for ( i0 = 0; i0 <= min( i1, M-1 ); i0++ ) {
			A[ idx ] = areal;
			A[ idx+1 ] = aimag;
			idx += strideA1;
		}
		ia += strideA2;
	}
	setDiagonal( M, N, breal, bimag, A, strideA1, strideA2, offsetA );
	return A;
}
Sets the upper triangular/trapezoidal part of a single-precision complex floating-point matrix `A` to specified values.

@private
@param {NonNegativeInteger} M - number of rows in matrix `A`
@param {NonNegativeInteger} N - number of columns in matrix `A`
@param {number} areal - real component of the value to assign to off-diagonal elements
@param {number} aimag - imaginary component of the value to assign to off-diagonal elements
@param {number} breal - real component of the value to assign to diagonal elements
@param {number} bimag - imaginary component of the value to assign to diagonal elements
@param {Float32Array} A - input matrix view
@param {integer} strideA1 - stride of the first dimension of `A`
@param {integer} strideA2 - stride of the second dimension of `A`
@param {NonNegativeInteger} offsetA - starting index for `A`
@returns {Float32Array} `A`

@example
var Float32Array = require( '@stdlib/array/float32' );

var A = new Float32Array( 8 );
// returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]

setUpper( 2, 2, 1.0, 2.0, 3.0, 4.0, A, 4, 2, 0 );
// A => <Float32Array>[ 3.0, 4.0, 1.0, 2.0, 0.0, 0.0, 3.0, 4.0 ]

@example
var Float32Array = require( '@stdlib/array/float32' );

var A = new Float32Array( 8 );
// returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]

setUpper( 2, 2, 1.0, 2.0, 3.0, 4.0, A, 4, -2, 2 );
// A => <Float32Array>[ 1.0, 2.0, 3.0, 4.0, 3.0, 4.0, 0.0, 0.0 ]

@example
var Float32Array = require( '@stdlib/array/float32' );

var A = new Float32Array( 8 );
// returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]

setUpper( 2, 2, 1.0, 2.0, 3.0, 4.0, A, -4, 2, 4 );
// A => <Float32Array>[ 0.0, 0.0, 3.0, 4.0, 3.0, 4.0, 1.0, 2.0 ]

@example
var Float32Array = require( '@stdlib/array/float32' );

var A = new Float32Array( 8 );
// returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]

setUpper( 2, 2, 1.0, 2.0, 3.0, 4.0, A, -4, -2, 6 );
// A => <Float32Array>[ 3.0, 4.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0 ]

@example
var Float32Array = require( '@stdlib/array/float32' );

var A = new Float32Array( 8 );
// returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]

setUpper( 2, 2, 1.0, 2.0, 3.0, 4.0, A, 2, 4, 0 );
// A => <Float32Array>[ 3.0, 4.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0 ]

@example
var Float32Array = require( '@stdlib/array/float32' );

var A = new Float32Array( 8 );
// returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]

setUpper( 2, 2, 1.0, 2.0, 3.0, 4.0, A, -2, 4, 2 );
// A => <Float32Array>[ 0.0, 0.0, 3.0, 4.0, 3.0, 4.0, 1.0, 2.0 ]

@example
var Float32Array = require( '@stdlib/array/float32' );

var A = new Float32Array( 8 );
// returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]

setUpper( 2, 2, 1.0, 2.0, 3.0, 4.0, A, 2, -4, 4 );
// A => <Float32Array>[ 1.0, 2.0, 3.0, 4.0, 3.0, 4.0, 0.0, 0.0 ]

@example
var Float32Array = require( '@stdlib/array/float32' );

var A = new Float32Array( 8 );
// returns <Float32Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]

setUpper( 2, 2, 1.0, 2.0, 3.0, 4.0, A, -2, -4, 6 );
// A => <Float32Array>[ 3.0, 4.0, 1.0, 2.0, 0.0, 0.0, 3.0, 4.0 ]