# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
#
# SPDX-License-Identifier: Apache-2.0

import _cython_3_2_4
import enum
from typing import Any, Callable, ClassVar

__pyx_capi__: dict
__test__: dict
check_status: _cython_3_2_4.cython_function_or_method
get_property: _cython_3_2_4.cython_function_or_method
get_version: _cython_3_2_4.cython_function_or_method

class AlgMode(enum.IntEnum):
    """
    See `cusolverAlgMode_t`.
    """
    __new__: ClassVar[Callable] = ...
    ALG_0: ClassVar[AlgMode] = ...
    ALG_1: ClassVar[AlgMode] = ...
    ALG_2: ClassVar[AlgMode] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class DeterministicMode(enum.IntEnum):
    """
    See `cusolverDeterministicMode_t`.
    """
    __new__: ClassVar[Callable] = ...
    ALLOW_NON_DETERMINISTIC_RESULTS: ClassVar[DeterministicMode] = ...
    DETERMINISTIC_RESULTS: ClassVar[DeterministicMode] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class DirectMode(enum.IntEnum):
    """
    See `cusolverDirectMode_t`.
    """
    __new__: ClassVar[Callable] = ...
    BACKWARD: ClassVar[DirectMode] = ...
    FORWARD: ClassVar[DirectMode] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class EigComp(enum.IntEnum):
    """
    See `cusolverEigComp_t`.
    """
    __new__: ClassVar[Callable] = ...
    I: ClassVar[EigComp] = ...
    N: ClassVar[EigComp] = ...
    V: ClassVar[EigComp] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class EigMode(enum.IntEnum):
    """
    See `cusolverEigMode_t`.
    """
    __new__: ClassVar[Callable] = ...
    NOVECTOR: ClassVar[EigMode] = ...
    VECTOR: ClassVar[EigMode] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class EigRange(enum.IntEnum):
    """
    See `cusolverEigRange_t`.
    """
    __new__: ClassVar[Callable] = ...
    ALL: ClassVar[EigRange] = ...
    I: ClassVar[EigRange] = ...
    V: ClassVar[EigRange] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class EigType(enum.IntEnum):
    """
    See `cusolverEigType_t`.
    """
    __new__: ClassVar[Callable] = ...
    TYPE_1: ClassVar[EigType] = ...
    TYPE_2: ClassVar[EigType] = ...
    TYPE_3: ClassVar[EigType] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class IRSRefinement(enum.IntEnum):
    """
    See `cusolverIRSRefinement_t`.
    """
    __new__: ClassVar[Callable] = ...
    IRS_REFINE_CLASSICAL: ClassVar[IRSRefinement] = ...
    IRS_REFINE_CLASSICAL_GMRES: ClassVar[IRSRefinement] = ...
    IRS_REFINE_GMRES: ClassVar[IRSRefinement] = ...
    IRS_REFINE_GMRES_GMRES: ClassVar[IRSRefinement] = ...
    IRS_REFINE_GMRES_NOPCOND: ClassVar[IRSRefinement] = ...
    IRS_REFINE_NONE: ClassVar[IRSRefinement] = ...
    IRS_REFINE_NOT_SET: ClassVar[IRSRefinement] = ...
    PREC_DD: ClassVar[IRSRefinement] = ...
    PREC_SHT: ClassVar[IRSRefinement] = ...
    PREC_SS: ClassVar[IRSRefinement] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class MathMode(enum.IntEnum):
    """
    See `cusolverMathMode_t`.
    """
    __new__: ClassVar[Callable] = ...
    DEFAULT_MATH: ClassVar[MathMode] = ...
    FP32_EMULATED_BF16X9_MATH: ClassVar[MathMode] = ...
    FP32_FP64_EMULATED_MATH: ClassVar[MathMode] = ...
    FP64_EMULATED_FIXEDPOINT_MATH: ClassVar[MathMode] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class Norm(enum.IntEnum):
    """
    See `cusolverNorm_t`.
    """
    __new__: ClassVar[Callable] = ...
    FRO_NORM: ClassVar[Norm] = ...
    INF_NORM: ClassVar[Norm] = ...
    MAX_NORM: ClassVar[Norm] = ...
    ONE_NORM: ClassVar[Norm] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class PrecType(enum.IntEnum):
    """
    See `cusolverPrecType_t`.
    """
    __new__: ClassVar[Callable] = ...
    C_16BF: ClassVar[PrecType] = ...
    C_16F: ClassVar[PrecType] = ...
    C_32F: ClassVar[PrecType] = ...
    C_64F: ClassVar[PrecType] = ...
    C_8I: ClassVar[PrecType] = ...
    C_8U: ClassVar[PrecType] = ...
    C_AP: ClassVar[PrecType] = ...
    C_TF32: ClassVar[PrecType] = ...
    R_16BF: ClassVar[PrecType] = ...
    R_16F: ClassVar[PrecType] = ...
    R_32F: ClassVar[PrecType] = ...
    R_64F: ClassVar[PrecType] = ...
    R_8I: ClassVar[PrecType] = ...
    R_8U: ClassVar[PrecType] = ...
    R_AP: ClassVar[PrecType] = ...
    R_TF32: ClassVar[PrecType] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class Status(enum.IntEnum):
    """
    See `cusolverStatus_t`.
    """
    __new__: ClassVar[Callable] = ...
    ALLOC_FAILED: ClassVar[Status] = ...
    ARCH_MISMATCH: ClassVar[Status] = ...
    EXECUTION_FAILED: ClassVar[Status] = ...
    INTERNAL_ERROR: ClassVar[Status] = ...
    INVALID_LICENSE: ClassVar[Status] = ...
    INVALID_VALUE: ClassVar[Status] = ...
    INVALID_WORKSPACE: ClassVar[Status] = ...
    IRS_INFOS_NOT_DESTROYED: ClassVar[Status] = ...
    IRS_INFOS_NOT_INITIALIZED: ClassVar[Status] = ...
    IRS_INTERNAL_ERROR: ClassVar[Status] = ...
    IRS_MATRIX_SINGULAR: ClassVar[Status] = ...
    IRS_NOT_SUPPORTED: ClassVar[Status] = ...
    IRS_NRHS_NOT_SUPPORTED_FOR_REFINE_GMRES: ClassVar[Status] = ...
    IRS_OUT_OF_RANGE: ClassVar[Status] = ...
    IRS_PARAMS_INVALID: ClassVar[Status] = ...
    IRS_PARAMS_INVALID_MAXITER: ClassVar[Status] = ...
    IRS_PARAMS_INVALID_PREC: ClassVar[Status] = ...
    IRS_PARAMS_INVALID_REFINE: ClassVar[Status] = ...
    IRS_PARAMS_NOT_INITIALIZED: ClassVar[Status] = ...
    MAPPING_ERROR: ClassVar[Status] = ...
    MATRIX_TYPE_NOT_SUPPORTED: ClassVar[Status] = ...
    NOT_INITIALIZED: ClassVar[Status] = ...
    NOT_SUPPORTED: ClassVar[Status] = ...
    SUCCESS: ClassVar[Status] = ...
    ZERO_PIVOT: ClassVar[Status] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class StorevMode(enum.IntEnum):
    """
    See `cusolverStorevMode_t`.
    """
    __new__: ClassVar[Callable] = ...
    COLUMNWISE: ClassVar[StorevMode] = ...
    ROWWISE: ClassVar[StorevMode] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[int]] = ...
    _value2member_map_: ClassVar[dict] = ...

class cuSOLVERError(Exception):
    """cuSOLVERError(status)"""
    def __init__(self, status) -> Any:
        """Initialize self.  See help(type(self)) for accurate signature."""
    def __reduce__(self) -> Any:
        """cuSOLVERError.__reduce__(self)"""
