Adding method for resampleAdjoined(), please keep the comments for help during
debugging, we can remove them later..

have carefully written the kernel this time.. U guys, can recheck when ur
kernels are done