         self->ctx=c;
         memcpy(c->dst_shape,shape,sizeof(c->dst_shape));
         CUTRY(cudaMalloc(&c->dst,sizeof(TPixel)*prod(shape,3)));
+        CUTRY(cudaMemset( c->dst,0,sizeof(TPixel)*prod(shape,3)));
     } catch(int) {
         return 0;
     }

            }
        }
                
        if(!any_less_than_zero4(lambdas)) // other boundary                            
        {   
            // Map source index
            float r[3];
            #pragma unroll

  return argmin;
}


static int resample(struct resampler * const self,
                     const float * const cubeverts) {
