      static double _mp_correlate(_cimg_math_parser &mp, bool is_convolve) {
        double *ptrd = &_mp_arg(1) + 1;
        const double *const ptrA = &_mp_arg(2) + 1, *const ptrM = &_mp_arg(7) + 1;
        const unsigned int
          wA = (unsigned int)mp.opcode[3],
          hA = (unsigned int)mp.opcode[4],
          dA = (unsigned int)mp.opcode[5],
          sA = (unsigned int)mp.opcode[6],
          wM = (unsigned int)mp.opcode[8],
          hM = (unsigned int)mp.opcode[9],
          dM = (unsigned int)mp.opcode[10],
          sM = (unsigned int)mp.opcode[11],
          boundary_conditions = (unsigned int)_mp_arg(12),
          channel_mode = (unsigned int)mp.opcode[14];
        const bool
          is_normalized = (bool)_mp_arg(13),
          interpolation_type = (bool)_mp_arg(30);
        const int
          xcenter = mp.opcode[15]!=~0U?(int)_mp_arg(15):(int)(~0U>>1),
          ycenter = mp.opcode[16]!=~0U?(int)_mp_arg(16):(int)(~0U>>1),
          zcenter = mp.opcode[17]!=~0U?(int)_mp_arg(17):(int)(~0U>>1),
          xstart = (int)mp.opcode[18],
          ystart = (int)mp.opcode[19],
          zstart = (int)mp.opcode[20],
          xend = (int)mp.opcode[21],
          yend = (int)mp.opcode[22],
          zend = (int)mp.opcode[23];
        const float
          xstride = (float)_mp_arg(24),
          ystride = (float)_mp_arg(25),
          zstride = (float)_mp_arg(26),
          xdilation = (float)_mp_arg(27),
          ydilation = (float)_mp_arg(28),
          zdilation = (float)_mp_arg(29);
        CImg<doubleT> res;
        if (is_convolve) res = CImg<doubleT>(ptrA,wA,hA,dA,sA,true).
                           get_convolve(CImg<doubleT>(ptrM,wM,hM,dM,sM,true),
                                        boundary_conditions,is_normalized,channel_mode,
                                        xcenter,ycenter,zcenter,
                                        xstart,ystart,zstart,
                                        xend,yend,zend,
                                        xstride,ystride,zstride,
                                        xdilation,ydilation,zdilation,
                                        interpolation_type);
        else res = CImg<doubleT>(ptrA,wA,hA,dA,sA,true).
               get_correlate(CImg<doubleT>(ptrM,wM,hM,dM,sM,true),
                             boundary_conditions,is_normalized,channel_mode,
                             xcenter,ycenter,zcenter,
                             xstart,ystart,zstart,
                             xend,yend,zend,
                             xstride,ystride,zstride,
                             xdilation,ydilation,zdilation,
                             interpolation_type);
        CImg<doubleT>(ptrd,res._width,res._height,res._depth,res._spectrum,true) = res;
        return cimg::type<double>::nan();
      }
      static double _mp_correlate(_cimg_math_parser &mp, bool is_convolve) {
        double *ptrd = &_mp_arg(1) + 1;
        const double *const ptrA = &_mp_arg(2) + 1, *const ptrM = &_mp_arg(7) + 1;
        const unsigned int
          wA = (unsigned int)mp.opcode[3],
          hA = (unsigned int)mp.opcode[4],
          dA = (unsigned int)mp.opcode[5],
          sA = (unsigned int)mp.opcode[6],
          wM = (unsigned int)mp.opcode[8],
          hM = (unsigned int)mp.opcode[9],
          dM = (unsigned int)mp.opcode[10],
          sM = (unsigned int)mp.opcode[11],
          boundary_conditions = (unsigned int)_mp_arg(12),
          channel_mode = (unsigned int)mp.opcode[14];
        const bool
          is_normalized = (bool)_mp_arg(13),
          interpolation_type = (bool)_mp_arg(30);
        const int
          xcenter = mp.opcode[15]!=~0U?(int)_mp_arg(15):(int)(~0U>>1),
          ycenter = mp.opcode[16]!=~0U?(int)_mp_arg(16):(int)(~0U>>1),
          zcenter = mp.opcode[17]!=~0U?(int)_mp_arg(17):(int)(~0U>>1),
          xstart = (int)mp.opcode[18],
          ystart = (int)mp.opcode[19],
          zstart = (int)mp.opcode[20],
          xend = (int)mp.opcode[21],
          yend = (int)mp.opcode[22],
          zend = (int)mp.opcode[23];
        const float
          xstride = (float)_mp_arg(24),
          ystride = (float)_mp_arg(25),
          zstride = (float)_mp_arg(26),
          xdilation = (float)_mp_arg(27),
          ydilation = (float)_mp_arg(28),
          zdilation = (float)_mp_arg(29);
        CImg<doubleT> res;
        if (is_convolve) res = CImg<doubleT>(ptrA,wA,hA,dA,sA,true).
                           get_convolve(CImg<doubleT>(ptrM,wM,hM,dM,sM,true),
                                        boundary_conditions,is_normalized,channel_mode,
                                        xcenter,ycenter,zcenter,
                                        xstart,ystart,zstart,
                                        xend,yend,zend,
                                        xstride,ystride,zstride,
                                        xdilation,ydilation,zdilation,
                                        interpolation_type);
        else res = CImg<doubleT>(ptrA,wA,hA,dA,sA,true).
               get_correlate(CImg<doubleT>(ptrM,wM,hM,dM,sM,true),
                             boundary_conditions,is_normalized,channel_mode,
                             xcenter,ycenter,zcenter,
                             xstart,ystart,zstart,
                             xend,yend,zend,
                             xstride,ystride,zstride,
                             xdilation,ydilation,zdilation,
                             interpolation_type);
        CImg<doubleT>(ptrd,res._width,res._height,res._depth,res._spectrum,true) = res;
        return cimg::type<double>::nan();
      }