unified kernel for all real types