function createSourceFile( signature ) {
	var match1;
	var macro;
	var fpath;
	var file;
	var args;
	var err;
	var inc;
	var tmp;
	var ch1;
	var ch2;
	var ct1;
	var ct2;
	var nb1;
	var nb2;
	var t1;
	var t2;

	file = replace( TMPL_SOURCE, '{{YEAR}}', CURRENT_YEAR );
	file = replace( file, '{{COPYRIGHT}}', COPYRIGHT );
	file = replace( file, '{{SIGNATURE}}', signature );

	// Ensure the appropriate header files are included in source files:
	inc = [];
	if ( /c/.test( signature ) ) {
		inc.push( '#include "stdlib/complex/float32/ctor.h"' );
	}
	if ( /z/.test( signature ) ) {
		inc.push( '#include "stdlib/complex/float64/ctor.h"' );
	}
	if ( /x/.test( signature ) ) {
		inc.push( '#include <stdbool.h>' );
	}
	if ( inc.length ) {
		file = replace( file, '{{INCLUDES}}', '\n'+inc.join( '\n' ) );
	} else {
		file = replace( file, '{{INCLUDES}}', '' );
	}
	// Ensure the appropriate header files are included in source documentation examples:
	file = replace( file, '{{EXAMPLE_INCLUDES}}', '' );

	// Resolve the array data types:
	match1 = signature.match( RE_SIGNATURE );
	ch1 = match1[ 1 ];
	t1 = char2dtype( ch1 );
	ch2 = match1[ 2 ];
	t2 = char2dtype( ch2 );

	// Define array data types:
	file = replace( file, '{{INPUT_NDARRAY_1_DTYPE_UPPER}}', uppercase( t1 ) );
	file = replace( file, '{{OUTPUT_NDARRAY_DTYPE_UPPER}}', uppercase( t2 ) );

	file = replace( file, '{{INPUT_NDARRAY_1_DTYPE_LOWER}}', t1 );
	file = replace( file, '{{OUTPUT_NDARRAY_DTYPE_LOWER}}', t2 );

	// Define the input array C data type:
	file = replace( file, '{{INPUT_NDARRAY_1_CTYPE}}', dtype2c( t1 ) );

	// Define the number of bytes per element for the respective arrays:
	nb1 = bytesPerElement( t1 );
	file = replace( file, '{{INPUT_NDARRAY_1_BYTES_PER_ELEMENT}}', nb1.toString() );

	nb2 = bytesPerElement( t2 );
	file = replace( file, '{{OUTPUT_NDARRAY_BYTES_PER_ELEMENT}}', nb2.toString() );

	// Define the array shapes:
	file = defineShapes( file );

	// Define underlying byte arrays:
	file = defineByteArrays( file, nb1, nb2 );

	// Define array strides:
	file = defineStrides( file, nb1, nb2 );

	// Resolve C data types:
	ct1 = dtype2c( t1 );
	ct2 = dtype2c( t2 );

	// Resolve the 0D expression:
	if ( /[cz]/.test( signature ) ) {
		if ( ch1 === ch2 ) { // e.g., z_z, c_c
			tmp = 'v';
		} else if ( ch2 === 'z' ) { // e.g., c_z, d_z, u_z
			tmp = format( 'stdlib_complex128_from_%s( v )', char2dtype( ch1 ) );// e.g., stdlib_complex128_from_float64( v )
		} else if ( ch2 === 'c' ) {
			if ( ch1 === 'z' ) { // e.g., z_c
				tmp = 'stdlib_complex128_to_complex64( v )';
			} else { // e.g., f_c
				tmp = format( 'stdlib_complex64_from_%s( v )', char2dtype( ch1 ) );
			}
		} else { // e.g., z_d, c_f
			// Based on type promotion rules and conventions, we shouldn't reach here.
		}
	} else if ( ch1 === ch2 ) { // e.g., d_d, f_f, b_b
		tmp = 'v';
	} else { // e.g., b_d, f_d
		tmp = format( '(%s)v', ct2 ); // e.g., (double)v
	}
	file = replace( file, '{{EXPRESSION_0D}}', tmp );

	// Resolve the loop macro:
	if ( /[cz]/.test( signature ) ) {
		// E.g., z_z, c_c, c_z, f_c, d_z, u_z, #_(c|z), etc.
		if ( ch1 === ch2 ) { // e.g., z_z, c_c
			macro = MACROS.nocast;
			args = [ ct1, ct2 ];
		} else if ( ch2 === 'z' ) { // e.g., c_z, d_z, u_z
			macro = MACROS.fcast;
			args = [ ct1, ct2, 'stdlib_complex128_from_'+char2dtype( ch1 ) ];
		} else if ( ch2 === 'c' ) {
			macro = MACROS.fcast;
			args = [ ct1, ct2 ];
			if ( ch1 === 'z' ) { // e.g., z_c
				args.push( 'stdlib_complex128_to_complex64' );
			} else { // e.g., f_c
				args.push( 'stdlib_complex64_from_'+char2dtype( ch1 ) );
			}
		} else { // e.g., z_d
			throw new Error( 'unexpected error. Should not reach this branch according to type promotion rules.' );
		}
	} else {
		macro = MACROS.cast;
		args = [ ct1, ct2 ];
	}
	file = replace( file, '{{LOOP_MACRO}}', macro );
	file = replace( file, '{{LOOP_MACRO_ARGUMENTS}}', args.join( ', ' ) );

	// Create the source file:
	fpath = path.join( SRC_DIR, signature+'.c' );
	debug( 'Creating source file: %s', fpath );
	err = writeFile( fpath, file, FOPTS );
	if ( err ) {
		throw err;
	}
}
Creates a source file for a provided loop signature.

@private
@param {string} signature - loop signature
@throws {Error} unexpected error