gpu.c: extract_grid_size: extract out extract_size