# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.4.0
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.


#
# Copyright (c) 2016-2025 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# 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.


__all__ = ["task_arena",
           "task_group",
           "global_control",
           "default_num_threads",
           "this_task_arena_max_concurrency",
           "this_task_arena_current_thread_index",
           "runtime_version",
           "runtime_interface_version"]



from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
    from . import _api
else:
    import _api

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

_swig_new_instance_method = _api.SWIG_PyInstanceMethod_New
_swig_new_static_method = _api.SWIG_PyStaticMethod_New

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


_concurrency_barrier = _api._concurrency_barrier
class task_arena(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    automatic = _api.task_arena_automatic

    def __init__(self, *args):
        _api.task_arena_swiginit(self, _api.new_task_arena(*args))
    __swig_destroy__ = _api.delete_task_arena
    initialize = _swig_new_instance_method(_api.task_arena_initialize)
    terminate = _swig_new_instance_method(_api.task_arena_terminate)
    is_active = _swig_new_instance_method(_api.task_arena_is_active)
    enqueue = _swig_new_instance_method(_api.task_arena_enqueue)
    execute = _swig_new_instance_method(_api.task_arena_execute)

# Register task_arena in _api:
_api.task_arena_swigregister(task_arena)
class task_group(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _api.task_group_swiginit(self, _api.new_task_group())
    __swig_destroy__ = _api.delete_task_group
    wait = _swig_new_instance_method(_api.task_group_wait)
    cancel = _swig_new_instance_method(_api.task_group_cancel)
    run = _swig_new_instance_method(_api.task_group_run)

# Register task_group in _api:
_api.task_group_swigregister(task_group)
class global_control(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    max_allowed_parallelism = _api.global_control_max_allowed_parallelism
    thread_stack_size = _api.global_control_thread_stack_size
    parameter_max = _api.global_control_parameter_max

    def __init__(self, param, value):
        _api.global_control_swiginit(self, _api.new_global_control(param, value))
    __swig_destroy__ = _api.delete_global_control
    active_value = _swig_new_static_method(_api.global_control_active_value)

# Register global_control in _api:
_api.global_control_swigregister(global_control)
runtime_version = _api.runtime_version
runtime_interface_version = _api.runtime_interface_version
this_task_arena_max_concurrency = _api.this_task_arena_max_concurrency
this_task_arena_current_thread_index = _api.this_task_arena_current_thread_index

default_num_threads = this_task_arena_max_concurrency


