code: def _compute_multi_D(
      d,
      k,
      idx,
      D,
      T,
      m,
      excl_zone,
      M_T,
      Σ_T,
      QT_even,
      QT_odd,
      QT_first,
      μ_Q,
      σ_Q,
      Q_subseq_isconstant,
      T_subseq_isconstant,
  ):
      """
      A Numba JIT-compiled version of mSTOMP for parallel computation of the
      multi-dimensional distance profile
  
      Parameters
      ----------
      d : int
          The total number of dimensions in `T`
  
      k : int
          The total number of sliding windows to iterate over
  
      idx : int
          The subsequence index for the i-th time series, `T[i]`
  
      D : numpy.ndarray
          The output distance profile
  
      T : numpy.ndarray
          The time series or sequence for which to compute the matrix profile
  
      m : int
          Window size
  
      excl_zone : int
          The half width for the exclusion zone relative to the current
          sliding window
  
      M_T : numpy.ndarray
          Sliding mean of time series, `T`
  
      Σ_T : numpy.ndarray
          Sliding standard deviation of time series, `T`
  
      QT_even : numpy.ndarray
          Dot product between some query sequence,`Q`, and time series, `T`
  
      QT_odd : numpy.ndarray
          Dot product between some query sequence,`Q`, and time series, `T`
  
      QT_first : numpy.ndarray
          QT for the first window relative to the current sliding window
  
      μ_Q : numpy.ndarray
          Mean of the query sequence, `Q`, relative to the current sliding window
  
      σ_Q : numpy.ndarray
          Standard deviation of the query sequence, `Q`, relative to the current
          sliding window
  
      Q_subseq_isconstant : numpy.ndarray
          A boolean array that indicates whether the query subsequence in `Q`
          is constant (True)
  
      T_subseq_isconstant : numpy.ndarray
          A boolean array that indicates whether a subsequence in `T`
          is constant (True)
  
      Returns
      -------
      None
  
      Notes
      -----
      `DOI: 10.1109/ICDM.2017.66 \
      <https://www.cs.ucr.edu/~eamonn/Motif_Discovery_ICDM.pdf>`__
  
      See mSTAMP Algorithm
      """
      for i in range(d):
          # Numba's prange requires incrementing a range by 1 so replace
          # `for j in range(k-1,0,-1)` with its incrementing compliment
          for rev_j in prange(1, k):
              j = k - rev_j
              # GPU Stomp Parallel Implementation with Numba
              # DOI: 10.1109/ICDM.2016.0085
              # See Figure 5
              if idx % 2 == 0:
                  # Even
                  QT_even[i, j] = (
                      QT_odd[i, j - 1]
                      - T[i, idx - 1] * T[i, j - 1]
                      + T[i, idx + m - 1] * T[i, j + m - 1]
                  )
              else:
                  # Odd
                  QT_odd[i, j] = (
                      QT_even[i, j - 1]
                      - T[i, idx - 1] * T[i, j - 1]
                      + T[i, idx + m - 1] * T[i, j + m - 1]
                  )
  
          if idx % 2 == 0:
              QT_even[i, 0] = QT_first[i, idx]
              D[i] = core._calculate_squared_distance_profile(
                  m,
                  QT_even[i],
                  μ_Q[i, idx],
                  σ_Q[i, idx],
                  M_T[i],
                  Σ_T[i],
                  Q_subseq_isconstant[i, idx],
                  T_subseq_isconstant[i],
              )
          else:
              QT_odd[i, 0] = QT_first[i, idx]
              D[i] = core._calculate_squared_distance_profile(
                  m,
                  QT_odd[i],
                  μ_Q[i, idx],
                  σ_Q[i, idx],
                  M_T[i],
                  Σ_T[i],
                  Q_subseq_isconstant[i, idx],
                  T_subseq_isconstant[i],
              )
  
      core._apply_exclusion_zone(D, idx, excl_zone, np.inf)
  
file_path: stumpy/stumpy/mstump.py
imports: from functools import lru_cache, partial
  import numpy
  from numba import njit, prange
  from scipy.stats import norm
  from .None import config, core
  from .maamp import maamp, maamp_mdl, maamp_multi_distance_profile, maamp_subspace
label_desc: Use image node_id 10 for calling a global function with example usage: _compute_multi_D(d, k, idx, D, T, m, excl_zone, M_T, Σ_T, QT_even, QT_odd, QT_first, μ_Q, σ_Q, Q_subseq_isconstant, T_subseq_isconstant) without return types