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


#
# Copyright (c) 2016-2019 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", "task_scheduler_init", "global_control", "default_num_threads"]



from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (3, 0, 0):
    new_instancemethod = lambda func, inst, cls: _api.SWIG_PyInstanceMethod_New(func)
else:
    from new import instancemethod as new_instancemethod
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_api')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_api')
    _api = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_api', [dirname(__file__)])
        except ImportError:
            import _api
            return _api
        try:
            _mod = imp.load_module('_api', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _api = swig_import_helper()
    del swig_import_helper
else:
    import _api
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        object.__setattr__(self, name, value)
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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_method(set):
    def set_attr(self, name, value):
        if (name == "thisown"):
            return self.this.own(value)
        if hasattr(self, name) or (name == "this"):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr



def _concurrency_barrier(*args):
    return _api._concurrency_barrier(*args)
_concurrency_barrier = _api._concurrency_barrier
class task_scheduler_init(object):
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    automatic = _api.task_scheduler_init_automatic
    deferred = _api.task_scheduler_init_deferred

    def __init__(self, *args):
        _api.task_scheduler_init_swiginit(self, _api.new_task_scheduler_init(*args))
    __swig_destroy__ = _api.delete_task_scheduler_init
    default_num_threads = staticmethod(_api.task_scheduler_init_default_num_threads)
task_scheduler_init.initialize = new_instancemethod(_api.task_scheduler_init_initialize, None, task_scheduler_init)
task_scheduler_init.terminate = new_instancemethod(_api.task_scheduler_init_terminate, None, task_scheduler_init)
task_scheduler_init.is_active = new_instancemethod(_api.task_scheduler_init_is_active, None, task_scheduler_init)
task_scheduler_init.blocking_terminate = new_instancemethod(_api.task_scheduler_init_blocking_terminate, None, task_scheduler_init)
task_scheduler_init_swigregister = _api.task_scheduler_init_swigregister
task_scheduler_init_swigregister(task_scheduler_init)

def task_scheduler_init_default_num_threads():
    return _api.task_scheduler_init_default_num_threads()
task_scheduler_init_default_num_threads = _api.task_scheduler_init_default_num_threads

class task_arena(object):
    thisown = _swig_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
    current_thread_index = staticmethod(_api.task_arena_current_thread_index)

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

def task_arena_current_thread_index():
    return _api.task_arena_current_thread_index()
task_arena_current_thread_index = _api.task_arena_current_thread_index

class task_group(object):
    thisown = _swig_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
task_group.wait = new_instancemethod(_api.task_group_wait, None, task_group)
task_group.is_canceling = new_instancemethod(_api.task_group_is_canceling, None, task_group)
task_group.cancel = new_instancemethod(_api.task_group_cancel, None, task_group)
task_group.run = new_instancemethod(_api.task_group_run, None, task_group)
task_group_swigregister = _api.task_group_swigregister
task_group_swigregister(task_group)

class global_control(object):
    thisown = _swig_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 = staticmethod(_api.global_control_active_value)
global_control_swigregister = _api.global_control_swigregister
global_control_swigregister(global_control)

def global_control_active_value(param):
    return _api.global_control_active_value(param)
global_control_active_value = _api.global_control_active_value


default_num_threads = task_scheduler_init_default_num_threads



