@fftw_normxcorr.register('<STR_LIT>')<EOL>@fftw_normxcorr.register('<STR_LIT>')<EOL>@fftw_normxcorr.register('<STR_LIT>')<EOL>def _fftw_stream_xcorr(templates, stream, *args, **kwargs):
<EOL>num_cores_inner = kwargs.get('<STR_LIT>')<EOL>num_cores_outer = kwargs.get('<STR_LIT>')<EOL>if num_cores_inner is None and num_cores_outer is None:<EOL><INDENT>num_cores_inner = int(os.getenv("<STR_LIT>", cpu_count()))<EOL>num_cores_outer = <NUM_LIT:1><EOL><DEDENT>elif num_cores_inner is not None and num_cores_outer is None:<EOL><INDENT>num_cores_outer = <NUM_LIT:1><EOL><DEDENT>elif num_cores_outer is not None and num_cores_inner is None:<EOL><INDENT>num_cores_inner = <NUM_LIT:1><EOL><DEDENT>chans = [[] for _i in range(len(templates))]<EOL>array_dict_tuple = _get_array_dicts(templates, stream)<EOL>stream_dict, template_dict, pad_dict, seed_ids = array_dict_tuple<EOL>assert set(seed_ids)<EOL>cccsums, tr_chans = fftw_multi_normxcorr(<EOL>template_array=template_dict, stream_array=stream_dict,<EOL>pad_array=pad_dict, seed_ids=seed_ids, cores_inner=num_cores_inner,<EOL>cores_outer=num_cores_outer)<EOL>no_chans = np.sum(np.array(tr_chans).astype(np.int), axis=<NUM_LIT:0>)<EOL>for seed_id, tr_chan in zip(seed_ids, tr_chans):<EOL><INDENT>for chan, state in zip(chans, tr_chan):<EOL><INDENT>if state:<EOL><INDENT>chan.append((seed_id.split('<STR_LIT:.>')[<NUM_LIT:1>],<EOL>seed_id.split('<STR_LIT:.>')[-<NUM_LIT:1>].split('<STR_LIT:_>')[<NUM_LIT:0>]))<EOL><DEDENT><DEDENT><DEDENT>return cccsums, no_chans, chans<EOL>
Apply fftw normxcorr routine concurrently.

:type templates: list
:param templates:
    A list of templates, where each one should be an obspy.Stream object
    containing multiple traces of seismic data and the relevant header
    information.
:type stream: obspy.core.stream.Stream
:param stream:
    A single Stream object to be correlated with the templates.

:returns:
    New list of :class:`numpy.ndarray` objects.  These will contain
    the correlation sums for each template for this day of data.
:rtype: list
:returns:
    list of ints as number of channels used for each cross-correlation.
:rtype: list
:returns:
    list of list of tuples of station, channel for all cross-correlations.
:rtype: list