fixed a bug in cpu
fixed a logical bug in srt algo