From c33314344e9aa3cf328911e257284189888d09dd Mon Sep 17 00:00:00 2001 From: Arpan Kumar Mishra Date: Mon, 31 Oct 2016 23:32:50 +0530 Subject: [PATCH 1/4] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 40ea35f..ceb7bc8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # code.fun.do Microsoft Hackathon. Reviving the choice engine and making all code open-source. +Cross category. From 3798305c191d2e53bd643cdd57ae926e14ce0ee4 Mon Sep 17 00:00:00 2001 From: Arpan Kumar Mishra Date: Mon, 31 Oct 2016 23:35:38 +0530 Subject: [PATCH 2/4] Add files via upload --- setup.py | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..5765dad --- /dev/null +++ b/setup.py @@ -0,0 +1,123 @@ +#!/usr/bin/env python + +from distutils.core import setup, Extension, Command +from unittest import TextTestRunner, TestLoader +from glob import glob +from os.path import splitext, basename, join as pjoin +import os, sys + +# This should be customized for specific instals + +if os.name == 'nt': + common_include_base = r"C:\Program Files (x86)\scilab-5.2.1\modules" + sci_include = [ + os.path.join(common_include_base, "core", "includes"), + os.path.join(common_include_base, "call_scilab", "includes"), + os.path.join(common_include_base, "api_scilab", "includes") + ] + + sci_lib_dir = [r"C:\Program Files (x86)\scilab-5.2.1\bin"] + sci_librairies = ['LibScilab', 'api_scilab'] + +elif os.name == 'posix': + common_include_base = os.path.join("/","usr", "include", "scilab") + sci_include = [ common_include_base, + os.path.join(common_include_base, "core"), + os.path.join(common_include_base, "call_scilab") + ] + sci_lib_dir = [os.path.join("/","usr", "lib", "scilab")] + sci_librairies = ['scilab'] + sci_extra_link_args = ['-Wl,--no-as-needed -lpython2.7 -L/usr/lib/scilab -lsciapi_scilab -lscicall_scilab -lscioutput_stream -lscicore -lscilinear_algebra -lsciconsole -lscilocalization -lscipolynomials -lsciio -lscielementary_functions -lscisparse -lscihistory_manager -lscihistory_browser -lscigraphics -lscicompletion -lscifunctions -lsciboolean -lsciwindows_tools -lscitime -lscifftw -lsciintersci -lscidouble -lscicommons -lsciaction_binding -lscitclsci'] +else: + raise NotImplementedError, "Only 'nt' and 'posix' are supported" + +sci_sources = ['sciscipy.c', 'sciconv_read.c', 'sciconv_write.c', 'util.c'] + +if os.environ.get('SCI'): + common_include_base_call=os.path.join("/",os.environ.get('SCI'),"..","..","include","scilab") + sci_include.append(os.path.join("/", common_include_base_call)) + sci_include.append(os.path.join("/", common_include_base_call, "core")) + sci_include.append(os.path.join("/",common_include_base_call, "call_scilab")) + sci_lib_dir.append(os.path.join("/",os.environ.get('SCI'),"..","..","lib","scilab")) + + +sci_install = os.path.join("/", "usr", "local", "share", "scilab") + +list_of_macros = [('SCI', '"' + sci_install + '"'), ('SCIDEBUG', 0)] + +# Test for python version +if sys.version_info[0] >= 3: + list_of_macros += [('PYTHON3', 1)] + +# Test for numpy +try: + import numpy + import numpy.distutils.misc_util as misc + sci_include += os.path.join(misc.get_numpy_include_dirs()) + numpy_is_avail = 1 + sci_sources += ['deallocator.c'] +except ImportError: + numpy_is_avail = 0 + +list_of_macros += [('NUMPY', numpy_is_avail)] + + +class TestCommand(Command): + user_options = [ ] + + def initialize_options(self): + self._dir = os.getcwd() + + def finalize_options(self): + pass + + def run(self): + ''' + Finds all the tests modules in test/, and runs them. + ''' + testfiles = [ ] + for t in glob(pjoin(self._dir, 'tests', '*.py')): + if not t.endswith('__init__.py'): + testfiles.append('.'.join( + ['tests', splitext(basename(t))[0]]) + ) + + print(testfiles) + tests = TestLoader().loadTestsFromNames(testfiles) + t = TextTestRunner(verbosity = 2) + t.run(tests) + +module1 = Extension('sciscipy', + sources = sci_sources, + include_dirs = sci_include, + libraries = sci_librairies, + library_dirs = sci_lib_dir, + extra_link_args = sci_extra_link_args, + define_macros = list_of_macros +) + +long_description = r""" +The goal of sciscipy is to give an access to Scilab features inside python. + +from scilab import Scilab +sci = Scilab() + +x = sci.rand(20, 20) +y = x*x.transpose() +y_inv = sci.inv(y) + +The function func in sci.func(x, y) can be a Scilab built-in or any user +defined function so that Scilab libraries can be reused easily in python. +""" +setup ( name = 'sciscipy', + version = '1.0.0', + author = 'Vincent Guffens , Sylvestre Ledru ', + url = "http://forge.scilab.org/index.php/p/sciscipy/", + license = "GPL", + description = 'Scilab binding', + long_description = long_description, + ext_modules = [module1], + py_modules = ['scilab'], + data_files = [('share/sciscipy', ['scilab.cfg'])], + cmdclass = { 'test': TestCommand} +) From 4ea80730b128b1fb33e608363fb9f610c658b5af Mon Sep 17 00:00:00 2001 From: Arpan Kumar Mishra Date: Mon, 31 Oct 2016 23:40:12 +0530 Subject: [PATCH 3/4] Add files via upload --- GRAS_Element.py | 267 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 267 insertions(+) create mode 100644 GRAS_Element.py diff --git a/GRAS_Element.py b/GRAS_Element.py new file mode 100644 index 0000000..76768aa --- /dev/null +++ b/GRAS_Element.py @@ -0,0 +1,267 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 2.0.4 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + + + +from sys import version_info +if 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('_GRAS_Element', [dirname(__file__)]) + except ImportError: + import _GRAS_Element + return _GRAS_Element + if fp is not None: + try: + _mod = imp.load_module('_GRAS_Element', fp, pathname, description) + finally: + fp.close() + return _mod + _GRAS_Element = swig_import_helper() + del swig_import_helper +else: + import _GRAS_Element +del version_info +try: + _swig_property = property +except NameError: + pass # Python < 2.2 doesn't have 'property'. +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): + self.__dict__[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(name) + +def _swig_repr(self): + try: strthis = "proxy of " + self.this.__repr__() + except: strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + +try: + _object = object + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 + + +GRAS_MAX_ALIGNMENT = _GRAS_Element.GRAS_MAX_ALIGNMENT +class ThreadPoolConfig(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ThreadPoolConfig, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ThreadPoolConfig, name) + __repr__ = _swig_repr + def __init__(self): + this = _GRAS_Element.new_ThreadPoolConfig() + try: self.this.append(this) + except: self.this = this + __swig_setmethods__["thread_count"] = _GRAS_Element.ThreadPoolConfig_thread_count_set + __swig_getmethods__["thread_count"] = _GRAS_Element.ThreadPoolConfig_thread_count_get + if _newclass:thread_count = _swig_property(_GRAS_Element.ThreadPoolConfig_thread_count_get, _GRAS_Element.ThreadPoolConfig_thread_count_set) + __swig_setmethods__["node_mask"] = _GRAS_Element.ThreadPoolConfig_node_mask_set + __swig_getmethods__["node_mask"] = _GRAS_Element.ThreadPoolConfig_node_mask_get + if _newclass:node_mask = _swig_property(_GRAS_Element.ThreadPoolConfig_node_mask_get, _GRAS_Element.ThreadPoolConfig_node_mask_set) + __swig_setmethods__["processor_mask"] = _GRAS_Element.ThreadPoolConfig_processor_mask_set + __swig_getmethods__["processor_mask"] = _GRAS_Element.ThreadPoolConfig_processor_mask_get + if _newclass:processor_mask = _swig_property(_GRAS_Element.ThreadPoolConfig_processor_mask_get, _GRAS_Element.ThreadPoolConfig_processor_mask_set) + __swig_setmethods__["yield_strategy"] = _GRAS_Element.ThreadPoolConfig_yield_strategy_set + __swig_getmethods__["yield_strategy"] = _GRAS_Element.ThreadPoolConfig_yield_strategy_get + if _newclass:yield_strategy = _swig_property(_GRAS_Element.ThreadPoolConfig_yield_strategy_get, _GRAS_Element.ThreadPoolConfig_yield_strategy_set) + __swig_setmethods__["thread_priority"] = _GRAS_Element.ThreadPoolConfig_thread_priority_set + __swig_getmethods__["thread_priority"] = _GRAS_Element.ThreadPoolConfig_thread_priority_get + if _newclass:thread_priority = _swig_property(_GRAS_Element.ThreadPoolConfig_thread_priority_get, _GRAS_Element.ThreadPoolConfig_thread_priority_set) + __swig_destroy__ = _GRAS_Element.delete_ThreadPoolConfig + __del__ = lambda self : None; +ThreadPoolConfig_swigregister = _GRAS_Element.ThreadPoolConfig_swigregister +ThreadPoolConfig_swigregister(ThreadPoolConfig) + +class ThreadPool(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ThreadPool, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ThreadPool, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _GRAS_Element.new_ThreadPool(*args) + try: self.this.append(this) + except: self.this = this + def set_active(self): return _GRAS_Element.ThreadPool_set_active(self) + __swig_getmethods__["test_thread_priority"] = lambda x: _GRAS_Element.ThreadPool_test_thread_priority + if _newclass:test_thread_priority = staticmethod(_GRAS_Element.ThreadPool_test_thread_priority) + __swig_destroy__ = _GRAS_Element.delete_ThreadPool + __del__ = lambda self : None; +ThreadPool_swigregister = _GRAS_Element.ThreadPool_swigregister +ThreadPool_swigregister(ThreadPool) + +def ThreadPool_test_thread_priority(*args): + return _GRAS_Element.ThreadPool_test_thread_priority(*args) +ThreadPool_test_thread_priority = _GRAS_Element.ThreadPool_test_thread_priority + +class GlobalBlockConfig(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, GlobalBlockConfig, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, GlobalBlockConfig, name) + __repr__ = _swig_repr + def __init__(self): + this = _GRAS_Element.new_GlobalBlockConfig() + try: self.this.append(this) + except: self.this = this + def merge(self, *args): return _GRAS_Element.GlobalBlockConfig_merge(self, *args) + __swig_setmethods__["maximum_output_items"] = _GRAS_Element.GlobalBlockConfig_maximum_output_items_set + __swig_getmethods__["maximum_output_items"] = _GRAS_Element.GlobalBlockConfig_maximum_output_items_get + if _newclass:maximum_output_items = _swig_property(_GRAS_Element.GlobalBlockConfig_maximum_output_items_get, _GRAS_Element.GlobalBlockConfig_maximum_output_items_set) + __swig_setmethods__["buffer_affinity"] = _GRAS_Element.GlobalBlockConfig_buffer_affinity_set + __swig_getmethods__["buffer_affinity"] = _GRAS_Element.GlobalBlockConfig_buffer_affinity_get + if _newclass:buffer_affinity = _swig_property(_GRAS_Element.GlobalBlockConfig_buffer_affinity_get, _GRAS_Element.GlobalBlockConfig_buffer_affinity_set) + __swig_setmethods__["interruptible_work"] = _GRAS_Element.GlobalBlockConfig_interruptible_work_set + __swig_getmethods__["interruptible_work"] = _GRAS_Element.GlobalBlockConfig_interruptible_work_get + if _newclass:interruptible_work = _swig_property(_GRAS_Element.GlobalBlockConfig_interruptible_work_get, _GRAS_Element.GlobalBlockConfig_interruptible_work_set) + __swig_setmethods__["thread_pool"] = _GRAS_Element.GlobalBlockConfig_thread_pool_set + __swig_getmethods__["thread_pool"] = _GRAS_Element.GlobalBlockConfig_thread_pool_get + if _newclass:thread_pool = _swig_property(_GRAS_Element.GlobalBlockConfig_thread_pool_get, _GRAS_Element.GlobalBlockConfig_thread_pool_set) + __swig_destroy__ = _GRAS_Element.delete_GlobalBlockConfig + __del__ = lambda self : None; +GlobalBlockConfig_swigregister = _GRAS_Element.GlobalBlockConfig_swigregister +GlobalBlockConfig_swigregister(GlobalBlockConfig) + +class InputPortConfig(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, InputPortConfig, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, InputPortConfig, name) + __repr__ = _swig_repr + def __init__(self): + this = _GRAS_Element.new_InputPortConfig() + try: self.this.append(this) + except: self.this = this + __swig_setmethods__["item_size"] = _GRAS_Element.InputPortConfig_item_size_set + __swig_getmethods__["item_size"] = _GRAS_Element.InputPortConfig_item_size_get + if _newclass:item_size = _swig_property(_GRAS_Element.InputPortConfig_item_size_get, _GRAS_Element.InputPortConfig_item_size_set) + __swig_setmethods__["reserve_items"] = _GRAS_Element.InputPortConfig_reserve_items_set + __swig_getmethods__["reserve_items"] = _GRAS_Element.InputPortConfig_reserve_items_get + if _newclass:reserve_items = _swig_property(_GRAS_Element.InputPortConfig_reserve_items_get, _GRAS_Element.InputPortConfig_reserve_items_set) + __swig_setmethods__["maximum_items"] = _GRAS_Element.InputPortConfig_maximum_items_set + __swig_getmethods__["maximum_items"] = _GRAS_Element.InputPortConfig_maximum_items_get + if _newclass:maximum_items = _swig_property(_GRAS_Element.InputPortConfig_maximum_items_get, _GRAS_Element.InputPortConfig_maximum_items_set) + __swig_setmethods__["inline_buffer"] = _GRAS_Element.InputPortConfig_inline_buffer_set + __swig_getmethods__["inline_buffer"] = _GRAS_Element.InputPortConfig_inline_buffer_get + if _newclass:inline_buffer = _swig_property(_GRAS_Element.InputPortConfig_inline_buffer_get, _GRAS_Element.InputPortConfig_inline_buffer_set) + __swig_setmethods__["preload_items"] = _GRAS_Element.InputPortConfig_preload_items_set + __swig_getmethods__["preload_items"] = _GRAS_Element.InputPortConfig_preload_items_get + if _newclass:preload_items = _swig_property(_GRAS_Element.InputPortConfig_preload_items_get, _GRAS_Element.InputPortConfig_preload_items_set) + __swig_destroy__ = _GRAS_Element.delete_InputPortConfig + __del__ = lambda self : None; +InputPortConfig_swigregister = _GRAS_Element.InputPortConfig_swigregister +InputPortConfig_swigregister(InputPortConfig) + +class OutputPortConfig(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, OutputPortConfig, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, OutputPortConfig, name) + __repr__ = _swig_repr + def __init__(self): + this = _GRAS_Element.new_OutputPortConfig() + try: self.this.append(this) + except: self.this = this + __swig_setmethods__["item_size"] = _GRAS_Element.OutputPortConfig_item_size_set + __swig_getmethods__["item_size"] = _GRAS_Element.OutputPortConfig_item_size_get + if _newclass:item_size = _swig_property(_GRAS_Element.OutputPortConfig_item_size_get, _GRAS_Element.OutputPortConfig_item_size_set) + __swig_setmethods__["reserve_items"] = _GRAS_Element.OutputPortConfig_reserve_items_set + __swig_getmethods__["reserve_items"] = _GRAS_Element.OutputPortConfig_reserve_items_get + if _newclass:reserve_items = _swig_property(_GRAS_Element.OutputPortConfig_reserve_items_get, _GRAS_Element.OutputPortConfig_reserve_items_set) + __swig_setmethods__["maximum_items"] = _GRAS_Element.OutputPortConfig_maximum_items_set + __swig_getmethods__["maximum_items"] = _GRAS_Element.OutputPortConfig_maximum_items_get + if _newclass:maximum_items = _swig_property(_GRAS_Element.OutputPortConfig_maximum_items_get, _GRAS_Element.OutputPortConfig_maximum_items_set) + __swig_destroy__ = _GRAS_Element.delete_OutputPortConfig + __del__ = lambda self : None; +OutputPortConfig_swigregister = _GRAS_Element.OutputPortConfig_swigregister +OutputPortConfig_swigregister(OutputPortConfig) + +class Callable(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Callable, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Callable, name) + __repr__ = _swig_repr + def __init__(self): + this = _GRAS_Element.new_Callable() + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _GRAS_Element.delete_Callable + __del__ = lambda self : None; + def get_registered_names(self): return _GRAS_Element.Callable_get_registered_names(self) + def _handle_call(self, *args): return _GRAS_Element.Callable__handle_call(self, *args) +Callable_swigregister = _GRAS_Element.Callable_swigregister +Callable_swigregister(Callable) + +class Element(Callable): + __swig_setmethods__ = {} + for _s in [Callable]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Element, name, value) + __swig_getmethods__ = {} + for _s in [Callable]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Element, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _GRAS_Element.new_Element(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _GRAS_Element.delete_Element + __del__ = lambda self : None; + def to_element(self, *args): return _GRAS_Element.Element_to_element(self, *args) + def equals(self, *args): return _GRAS_Element.Element_equals(self, *args) + def to_string(self): return _GRAS_Element.Element_to_string(self) + def global_config(self, *args): return _GRAS_Element.Element_global_config(self, *args) + def commit_config(self): return _GRAS_Element.Element_commit_config(self) + def set_uid(self, *args): return _GRAS_Element.Element_set_uid(self, *args) + def get_uid(self): return _GRAS_Element.Element_get_uid(self) + def adopt_element(self, *args): return _GRAS_Element.Element_adopt_element(self, *args) + def locate_element(self, *args): return _GRAS_Element.Element_locate_element(self, *args) + def x(self, name, *args): + pmcargs = PMC_M(list(args)) + pmcret = self._handle_call(name, pmcargs) + return pmcret() + + def __getattr__(self, name): + return lambda *args: self.x(name, *args) + + def __eq__(self, rhs): + if not isinstance(rhs, Element): return False + return self.equals(rhs) + + def __str__(self): + return self.to_string() + +Element_swigregister = _GRAS_Element.Element_swigregister +Element_swigregister(Element) + +from PMC import * + +# This file is compatible with both classic and new-style classes. + + From c374c67f1876d74c7e99e121f89038ad91d0f93d Mon Sep 17 00:00:00 2001 From: Arpan Kumar Mishra Date: Mon, 31 Oct 2016 23:42:42 +0530 Subject: [PATCH 4/4] Add files via upload --- GRAS_ThreadPool.py | 125 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 GRAS_ThreadPool.py diff --git a/GRAS_ThreadPool.py b/GRAS_ThreadPool.py new file mode 100644 index 0000000..fb1bc10 --- /dev/null +++ b/GRAS_ThreadPool.py @@ -0,0 +1,125 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 2.0.4 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + + + +from sys import version_info +if 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('_GRAS_ThreadPool', [dirname(__file__)]) + except ImportError: + import _GRAS_ThreadPool + return _GRAS_ThreadPool + if fp is not None: + try: + _mod = imp.load_module('_GRAS_ThreadPool', fp, pathname, description) + finally: + fp.close() + return _mod + _GRAS_ThreadPool = swig_import_helper() + del swig_import_helper +else: + import _GRAS_ThreadPool +del version_info +try: + _swig_property = property +except NameError: + pass # Python < 2.2 doesn't have 'property'. +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): + self.__dict__[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(name) + +def _swig_repr(self): + try: strthis = "proxy of " + self.this.__repr__() + except: strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + +try: + _object = object + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 + + +GRAS_MAX_ALIGNMENT = _GRAS_ThreadPool.GRAS_MAX_ALIGNMENT +class ThreadPoolConfig(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ThreadPoolConfig, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ThreadPoolConfig, name) + __repr__ = _swig_repr + def __init__(self): + this = _GRAS_ThreadPool.new_ThreadPoolConfig() + try: self.this.append(this) + except: self.this = this + __swig_setmethods__["thread_count"] = _GRAS_ThreadPool.ThreadPoolConfig_thread_count_set + __swig_getmethods__["thread_count"] = _GRAS_ThreadPool.ThreadPoolConfig_thread_count_get + if _newclass:thread_count = _swig_property(_GRAS_ThreadPool.ThreadPoolConfig_thread_count_get, _GRAS_ThreadPool.ThreadPoolConfig_thread_count_set) + __swig_setmethods__["node_mask"] = _GRAS_ThreadPool.ThreadPoolConfig_node_mask_set + __swig_getmethods__["node_mask"] = _GRAS_ThreadPool.ThreadPoolConfig_node_mask_get + if _newclass:node_mask = _swig_property(_GRAS_ThreadPool.ThreadPoolConfig_node_mask_get, _GRAS_ThreadPool.ThreadPoolConfig_node_mask_set) + __swig_setmethods__["processor_mask"] = _GRAS_ThreadPool.ThreadPoolConfig_processor_mask_set + __swig_getmethods__["processor_mask"] = _GRAS_ThreadPool.ThreadPoolConfig_processor_mask_get + if _newclass:processor_mask = _swig_property(_GRAS_ThreadPool.ThreadPoolConfig_processor_mask_get, _GRAS_ThreadPool.ThreadPoolConfig_processor_mask_set) + __swig_setmethods__["yield_strategy"] = _GRAS_ThreadPool.ThreadPoolConfig_yield_strategy_set + __swig_getmethods__["yield_strategy"] = _GRAS_ThreadPool.ThreadPoolConfig_yield_strategy_get + if _newclass:yield_strategy = _swig_property(_GRAS_ThreadPool.ThreadPoolConfig_yield_strategy_get, _GRAS_ThreadPool.ThreadPoolConfig_yield_strategy_set) + __swig_setmethods__["thread_priority"] = _GRAS_ThreadPool.ThreadPoolConfig_thread_priority_set + __swig_getmethods__["thread_priority"] = _GRAS_ThreadPool.ThreadPoolConfig_thread_priority_get + if _newclass:thread_priority = _swig_property(_GRAS_ThreadPool.ThreadPoolConfig_thread_priority_get, _GRAS_ThreadPool.ThreadPoolConfig_thread_priority_set) + __swig_destroy__ = _GRAS_ThreadPool.delete_ThreadPoolConfig + __del__ = lambda self : None; +ThreadPoolConfig_swigregister = _GRAS_ThreadPool.ThreadPoolConfig_swigregister +ThreadPoolConfig_swigregister(ThreadPoolConfig) + +class ThreadPool(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ThreadPool, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ThreadPool, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _GRAS_ThreadPool.new_ThreadPool(*args) + try: self.this.append(this) + except: self.this = this + def set_active(self): return _GRAS_ThreadPool.ThreadPool_set_active(self) + __swig_getmethods__["test_thread_priority"] = lambda x: _GRAS_ThreadPool.ThreadPool_test_thread_priority + if _newclass:test_thread_priority = staticmethod(_GRAS_ThreadPool.ThreadPool_test_thread_priority) + __swig_destroy__ = _GRAS_ThreadPool.delete_ThreadPool + __del__ = lambda self : None; +ThreadPool_swigregister = _GRAS_ThreadPool.ThreadPool_swigregister +ThreadPool_swigregister(ThreadPool) + +def ThreadPool_test_thread_priority(*args): + return _GRAS_ThreadPool.ThreadPool_test_thread_priority(*args) +ThreadPool_test_thread_priority = _GRAS_ThreadPool.ThreadPool_test_thread_priority + +# This file is compatible with both classic and new-style classes. + +