     ////////////////////////////////////////////////////////////////////////
     // NONMAX
     
-    IntTex maskSumTex(0, cudaFilterModePoint, cudaAddressModeClamp);
-
     struct WithOutMask
     {
         static __device__ bool check(int, int, int)


        const int size = calcSize(c_octave, layer);

        /* Ignore pixels without a 3x3x3 neighbourhood in the layer above */
        const int margin = ((calcSize(c_octave, layer + 1) >> 1) >> c_octave) + 1;

        const int j = threadIdx.x + blockIdx.x * (blockDim.x - 2) + margin - 1;


                    if ((unsigned)y < (unsigned)((c_img_rows + 1) - grad_wav_size) && (unsigned)x < (unsigned)((c_img_cols + 1) - grad_wav_size))
                    {
                        X = c_aptW[tid] * icvCalcHaarPatternSum<2>(c_NX, 4, grad_wav_size, y, x);
                        Y = c_aptW[tid] * icvCalcHaarPatternSum<2>(c_NY, 4, grad_wav_size, y, x);
                    
                        angle = atan2f(Y, X);
                        if (angle < 0)
