コード例 #1
0
ファイル: tools.py プロジェクト: sys-git/pyopencl
def _register_types():
    from pyopencl.compyte.dtypes import _fill_dtype_registry

    _fill_dtype_registry(respect_windows=False, include_bool=False)

    get_or_register_dtype("cfloat_t", np.complex64)
    get_or_register_dtype("cdouble_t", np.complex128)

    is_64_bit = tuple.__itemsize__ * 8 == 64
    if not is_64_bit:
        get_or_register_dtype(["unsigned long", "unsigned long int"], np.uint64)
        get_or_register_dtype(["signed long", "signed long int", "long int"], np.int64)
コード例 #2
0
ファイル: tools.py プロジェクト: romanstingler/pyopencl
def _register_types():
    from pyopencl.compyte.dtypes import _fill_dtype_registry

    _fill_dtype_registry(respect_windows=False, include_bool=False)

    get_or_register_dtype("cfloat_t", np.complex64)
    get_or_register_dtype("cdouble_t", np.complex128)

    is_64_bit = tuple.__itemsize__ * 8 == 64
    if not is_64_bit:
        get_or_register_dtype(
                ["unsigned long", "unsigned long int"], np.uint64)
        get_or_register_dtype(
                ["signed long", "signed long int", "long int"], np.int64)
コード例 #3
0
ファイル: tools.py プロジェクト: lichinka/cai
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
"""



import numpy as np
from decorator import decorator
import pyopencl as cl

from pyopencl.compyte.dtypes import (
        register_dtype, _fill_dtype_registry,
        dtype_to_ctype)

_fill_dtype_registry(respect_windows=True)



PooledBuffer = cl.PooledBuffer
CLAllocator = cl.CLAllocator
MemoryPool = cl.MemoryPool




first_arg_dependent_memoized_functions = []



コード例 #4
0
ファイル: tools.py プロジェクト: braincorp/pyopencl


import numpy as np
from decorator import decorator
import pyopencl as cl
from pytools import memoize, memoize_method

import re

from pyopencl.compyte.dtypes import (
        get_or_register_dtype, TypeNameNotKnown,
        register_dtype, _fill_dtype_registry,
        dtype_to_ctype)

_fill_dtype_registry(respect_windows=False)
get_or_register_dtype("cfloat_t", np.complex64)
get_or_register_dtype("cdouble_t", np.complex128)




bitlog2 = cl.bitlog2

PooledBuffer = cl.PooledBuffer

from pyopencl._cl import _tools_DeferredAllocator as DeferredAllocator
from pyopencl._cl import _tools_ImmediateAllocator as ImmediateAllocator

class CLAllocator(DeferredAllocator):
    def __init__(self, *args, **kwargs):
コード例 #5
0
ファイル: tools.py プロジェクト: stephenbalaban/pyopencl


import numpy as np
from decorator import decorator
import pyopencl as cl
from pytools import memoize, memoize_method

import re

from pyopencl.compyte.dtypes import (
        get_or_register_dtype, TypeNameNotKnown,
        register_dtype, _fill_dtype_registry,
        dtype_to_ctype)

_fill_dtype_registry(respect_windows=False)
get_or_register_dtype("cfloat_t", np.complex64)
get_or_register_dtype("cdouble_t", np.complex128)




bitlog2 = cl.bitlog2

PooledBuffer = cl.PooledBuffer

from pyopencl._cl import _tools_DeferredAllocator as DeferredAllocator
from pyopencl._cl import _tools_ImmediateAllocator as ImmediateAllocator

class CLAllocator(DeferredAllocator):
    def __init__(self, *args, **kwargs):