# Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# This code was automatically generated from NVSHMEM $version_span. 
# Modify it directly at your own risk.


from libc.stdint cimport (
    int8_t,  uint8_t,
    int16_t, uint16_t,
    int32_t, uint32_t,
    int64_t, uint64_t,
    intptr_t, uintptr_t
)

###############################################################################
# Types (structs, enums, ...)
###############################################################################

# enums
$enum_decls


# types
cdef extern from "cuda_runtime_api.h":
    cdef struct CUstream_st
    ctypedef CUstream_st* cudaStream_t

ctypedef void* CUmodule 'CUmodule'
ctypedef void* CUlibrary 'CUlibrary'

# Types for NVSHMEM Collectives
# Floats
cdef extern from "cuda_fp16.h":
    ctypedef struct __half:
        pass
    ctypedef __half half

cdef extern from "cuda_bf16.h":
    ctypedef struct __nv_bfloat16:
        pass
    ctypedef __nv_bfloat16 bfloat16

cdef extern from "limits.h":
    cdef int16_t INT16_MAX;



# Longs
ctypedef long longlong
ctypedef signed char schar



$type_decls


###############################################################################
# Functions
###############################################################################

$func_decls