ceshi: resample c++ api