function signatures( dtypes1, dtypes2, options ) {
	var casts;
	var opts;
	var tmp;
	var out;
	var dt1;
	var dt2;
	var t1;
	var M;
	var i;
	var j;

	if ( arguments.length > 2 ) {
		opts = options;
	} else {
		opts = {};
	}
	// Resolve the list of provided data types to data type strings:
	dt1 = resolve( dtypes1 );
	if ( dt1 instanceof Error ) {
		throw dt1;
	}
	if ( dtypes2 === dtypes1 ) { // don't do work if we don't need to
		dt2 = dt1;
	} else {
		dt2 = resolve( dtypes2 );
		if ( dt2 instanceof Error ) {
			throw dt2;
		}
	}
	// Sort the list of return dtypes:
	dt2.sort();

	// Generate the list of signatures...
	M = dt1.length;
	out = [];
	for ( i = 0; i < M; i++ ) {
		t1 = dt1[ i ];

		// Resolve the list of safe casts for the input dtype:
		casts = safeCasts( t1 );
		if ( casts === null ) {
			continue;
		}
		// Remove safe casts which are not among the supported output dtypes:
		casts = intersection( dt2, casts.sort() );

		// Generate signatures for allowed casts...
		for ( j = 0; j < casts.length; j++ ) {
			out.push( t1, 'uint8', casts[ j ] );
		}
	}
	if ( opts.enums ) {
		tmp = [];
		for ( i = 0; i < out.length; i++ ) {
			tmp.push( resolveEnum( out[ i ] ) );
		}
		out = tmp;
	}
	return out;
}
Generates a list of masked unary interface signatures from strided array data types.

## Notes

-   The function returns a strided array having a stride length of `3` (i.e., every `3` elements define a masked unary interface signature).
-   For each signature (i.e., set of three consecutive non-overlapping strided array elements), the first element is the input data type, the second element is the mask data type, and the last element is the return data type.
-   All signatures follow type promotion rules.
-   The mask array data type is always `uint8`.

@param {Array} dtypes1 - list of supported data types for the first argument
@param {Array} dtypes2 - list of supported data types for the output argument
@param {Options} [options] - options
@param {boolean} [options.enums=false] - boolean flag indicating whether to return signatures as a list of enumeration constants
@throws {TypeError} must provide recognized data types
@returns {Array} strided array containing masked unary interface signatures

@example
var dtypes = [
    'float64',
    'float32',
    'int32',
    'uint8'
];

var sigs = signatures( dtypes, dtypes );
// e.g., returns [ 'float32', 'uint8', 'float32', ... ]