adding support for thread_id, block_dim and grid_dim on cpu