# ===----------------------------------------------------------------------=== #
# Copyright (c) 2026, Modular Inc. All rights reserved.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions:
# https://llvm.org/LICENSE.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===----------------------------------------------------------------------=== #

from std.benchmark import Bench, BenchConfig, Bencher, BenchId
from std.gpu.host import DeviceContext, Dim
from layout import *

comptime NUM_KERNELS_PER_ITERATION = 128
comptime NUM_WARMUP_ITERATIONS = 3
comptime NUM_ITERATIONS = 1000


def empty_kernel():
    pass


def empty_kernel_many_params[
    layout_1: Layout,
    layout_2: Layout,
    layout_3: Layout,
    layout_4: Layout,
    layout_5: Layout,
    layout_6: Layout,
    layout_7: Layout,
    layout_8: Layout,
    layout_9: Layout,
]():
    pass


def small_kernel(ptr: UnsafePointer[UInt64, MutAnyOrigin]):
    _ = ptr[]


def bench_empty_launch_caller(mut m: Bench, ctx: DeviceContext) raises:
    @parameter
    @always_inline
    def bench_empty_launch(mut b: Bencher) raises:
        @parameter
        @always_inline
