Implemented a static resampling kernel that handles allocation
Merge branch 'resampling'