code: def setup_block_and_grid(problem_size, grid_div, params, block_size_names=None):
      
      threads = get_thread_block_dimensions(params, block_size_names)
      current_problem_size = get_problem_size(problem_size, params)
      grid = get_grid_dimensions(current_problem_size, params, grid_div, block_size_names)
      return threads, grid
docs: compute problem size, thread block and grid dimensions for this kernel