def METHOD_NAME(n_simulations, threads_per_block):
    # Choosing the number of blocks and threads per block depends on the
    # hardware warpsize (32 for NVIDIA, 64 for AMD), and number of
    # simulations.
    # CUDA CURAND limits it to 256, so that's the hard limit we set.
    # We want to number of blocks to be a multiple of the
    # threads_per_block, so we saturate the GPU equally.
    # If the number of simulations isn't a multiple of it,
    # we just make the number of blocks slightly bigger, then fill
    # the rest of the space with zeros, which instantly finishes.
    max_tpb = 256
    if threads_per_block > max_tpb:
        # Limit of 256 threads per block from curand
        threads_per_block = max_tpb
    if n_simulations < max_tpb:
        block_count = 1
        threads_per_block = max_tpb
    elif n_simulations % threads_per_block == 0:
        block_count = int(n_simulations // threads_per_block)
    else:
        block_count = int(n_simulations // threads_per_block + 1)
    return block_count, threads_per_block