function createBenchmark( order, N, nrows ) {
	var IPIV;
	var abuf;
	var A;

	IPIV = discreteUniform( nrows, 0, N-1, {
		'dtype': 'int32'
	});

	abuf = uniform( 2*N*N, -10.0, 10.0, opts );
	A = new Complex64Array( abuf );

	return benchmark;

	/**
	* Benchmark function.
	*
	* @private
	* @param {Benchmark} b - benchmark instance
	*/
	function benchmark( b ) {
		var i;

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			claswp( order, N, A, N, 0, nrows-1, IPIV, 1 );
			if ( isnanf( abuf[ i%abuf.length ] ) ) {
				b.fail( 'should not return NaN' );
			}
		}
		b.toc();
		if ( isnanf( abuf[ i%abuf.length ] ) ) {
			b.fail( 'should not return NaN' );
		}
		b.pass( 'benchmark finished' );
		b.end();
	}
}
Creates a benchmark function.

@private
@param {string} order - storage layout
@param {PositiveInteger} N - number of elements along each dimension
@param {PositiveInteger} nrows - number of rows to interchange
@returns {Function} benchmark function