| /llvm-project-15.0.7/mlir/python/mlir/runtime/ |
| H A D | np_to_memref.py | 8 import ctypes 11 class C128(ctypes.Structure): 13 _fields_ = [("real", ctypes.c_double), ("imag", ctypes.c_double)] 16 class C64(ctypes.Structure): 18 _fields_ = [("real", ctypes.c_float), ("imag", ctypes.c_float)] 21 class F16(ctypes.Structure): 80 _fields_ = [("rank", ctypes.c_longlong), ("descriptor", ctypes.c_void_p)] 89 x.aligned = nparray.ctypes.data_as(ctypes.POINTER(ctp)) 95 x.aligned = nparray.ctypes.data_as(ctypes.POINTER(ctp)) 111 d.descriptor = ctypes.cast(ctypes.pointer(x), ctypes.c_void_p) [all …]
|
| /llvm-project-15.0.7/mlir/test/Integration/Dialect/SparseTensor/taco/tools/ |
| H A D | mlir_pytaco_utils.py | 8 import ctypes 141 shape = ctypes.POINTER(ctypes.c_ulonglong)() 144 indices = ctypes.POINTER(ctypes.c_ulonglong)() 146 ctypes.byref(shape), ctypes.byref(values), ctypes.byref(indices)) 182 shape = np_shape.ctypes.data_as(ctypes.POINTER(ctypes.c_ulonglong)) 185 indices = np_indices.ctypes.data_as(ctypes.POINTER(ctypes.c_ulonglong)) 187 perm = np_perm.ctypes.data_as(ctypes.POINTER(ctypes.c_ulonglong)) 188 sparse = np_sparse.ctypes.data_as(ctypes.POINTER(ctypes.c_uint8)) 214 ("storage", ctypes.POINTER(ctypes.c_ulonglong)), 300 ctypes.byref(ctypes.pointer(c_tensor_desc)), [all …]
|
| H A D | mlir_pytaco.py | 23 import ctypes 175 def _ctype_pointer_from_array(array: np.ndarray) -> ctypes.pointer: 177 return ctypes.pointer( 178 ctypes.pointer(runtime.get_ranked_memref_descriptor(array))) 1095 def _set_packed_sparse_tensor(self, pointer: ctypes.c_void_p) -> None: 1439 ctypes.pointer(ctypes.pointer(ctypes.c_char(0))) 1472 def dense_dst_ctype_pointer(self) -> ctypes.pointer: 1482 return ctypes.pointer(ctypes.pointer(mem_ref_desc)) 1484 def ctype_pointer(self) -> ctypes.pointer: 1501 return ctypes.pointer(ctypes.cast(ptr, ctypes.c_void_p))
|
| /llvm-project-15.0.7/mlir/test/python/ |
| H A D | execution_engine.py | 101 c_float_p = ctypes.c_float * 1 117 @ctypes.CFUNCTYPE(ctypes.c_float, ctypes.c_float, ctypes.c_int) 135 c_float_p = ctypes.c_float * 1 136 c_int_p = ctypes.c_int * 1 152 @ctypes.CFUNCTYPE(None, ctypes.POINTER(UnrankedMemRefDescriptor)) 175 ctypes.pointer(ctypes.pointer(get_unranked_memref_descriptor(inp_arr))), 186 ctypes.pointer( 198 @ctypes.CFUNCTYPE( 200 ctypes.POINTER( 226 ctypes.pointer(ctypes.pointer(get_ranked_memref_descriptor(inp_arr)))) [all …]
|
| /llvm-project-15.0.7/mlir/test/Integration/Dialect/SparseTensor/python/tools/ |
| H A D | np_to_sparse_tensor.py | 7 import ctypes 28 c_lib = ctypes.CDLL(lib_name) 31 c_lib.convertFromMLIRSparseTensorF64.restype = ctypes.c_void_p 62 rank = ctypes.c_ulonglong(0) 63 nse = ctypes.c_ulonglong(0) 64 shape = ctypes.POINTER(ctypes.c_ulonglong)() 65 values = ctypes.POINTER(np.ctypeslib.as_ctypes_type(dtype))() 66 indices = ctypes.POINTER(ctypes.c_ulonglong)() 68 ctypes.byref(nse), ctypes.byref(shape), 69 ctypes.byref(values), [all …]
|
| /llvm-project-15.0.7/lldb/test/API/tools/lldb-server/commandline/ |
| H A D | TestGdbRemoteConnection.py | 13 import ctypes 14 import ctypes.wintypes 17 kernel32 = ctypes.WinDLL("kernel32", use_last_error=True) 29 class OVERLAPPED(ctypes.Structure): 36 LPOVERLAPPED = ctypes.POINTER(OVERLAPPED) 76 raise ctypes.WinError(ctypes.get_last_error()) 83 raise ctypes.WinError(ctypes.get_last_error()) 88 raise ctypes.WinError(ctypes.get_last_error()) 91 buf = ctypes.create_string_buffer(size) 95 raise ctypes.WinError(ctypes.get_last_error()) [all …]
|
| /llvm-project-15.0.7/cross-project-tests/debuginfo-tests/dexter/dex/utils/windows/ |
| H A D | PrettyOutput.py | 11 import ctypes 12 import ctypes.wintypes 17 class _CONSOLE_SCREEN_BUFFER_INFO(ctypes.Structure): 19 _fields_ = [('dwSize', ctypes.wintypes._COORD), ('dwCursorPosition', 22 ctypes.c_ushort), ('srWindow', ctypes.wintypes._SMALL_RECT), 23 ('dwMaximumWindowSize', ctypes.wintypes._COORD)] 29 stdout = Stream(sys.stdout, ctypes.windll.kernel32.GetStdHandle(-11)) 36 ctypes.windll.kernel32.GetConsoleScreenBufferInfo( 37 s.os, ctypes.byref(info)) 54 ctypes.windll.kernel32.SetConsoleTextAttribute( [all …]
|
| /llvm-project-15.0.7/mlir/python/mlir/ |
| H A D | execution_engine.py | 7 import ctypes 23 prototype = ctypes.CFUNCTYPE(None, ctypes.c_void_p) 32 packed_args = (ctypes.c_void_p * len(ctypes_args))() 34 packed_args[argNum] = ctypes.cast(ctypes_args[argNum], ctypes.c_void_p) 42 callback = ctypes.cast(ctypes_callback, ctypes.c_void_p)
|
| /llvm-project-15.0.7/llvm/bindings/python/llvm/ |
| H A D | disassembler.py | 9 from ctypes import CFUNCTYPE 10 from ctypes import POINTER 11 from ctypes import addressof 12 from ctypes import c_byte 13 from ctypes import c_char_p 14 from ctypes import c_int 15 from ctypes import c_size_t 16 from ctypes import c_ubyte 17 from ctypes import c_uint64 18 from ctypes import c_void_p [all …]
|
| H A D | bit_reader.py | 9 from ctypes import POINTER 10 from ctypes import byref 11 from ctypes import c_char_p 12 from ctypes import cast
|
| H A D | common.py | 9 from ctypes import POINTER 10 from ctypes import c_void_p 11 from ctypes import cdll 13 import ctypes.util 122 t = ctypes.util.find_library(i)
|
| H A D | object.py | 79 from ctypes import c_char_p 80 from ctypes import c_char 81 from ctypes import POINTER 82 from ctypes import c_uint64 83 from ctypes import string_at
|
| /llvm-project-15.0.7/lldb/test/API/ |
| H A D | get_darwin_real_python.py | 7 import ctypes 8 dyld = ctypes.cdll.LoadLibrary('/usr/lib/system/libdyld.dylib') 9 namelen = ctypes.c_ulong(1024) 10 name = ctypes.create_string_buffer(b'\000', namelen.value) 11 dyld._NSGetExecutablePath(ctypes.byref(name), ctypes.byref(namelen))
|
| /llvm-project-15.0.7/mlir/test/Integration/Dialect/SparseTensor/python/ |
| H A D | test_elementwise_add_sparse_output.py | 3 import ctypes 74 mem_a = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(a))) 75 mem_b = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(b))) 78 out = ctypes.c_char(0) 79 mem_out = ctypes.pointer(ctypes.pointer(out))
|
| H A D | test_SpMM.py | 4 import ctypes 87 mem_a = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(a))) 88 mem_b = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(b))) 89 mem_c = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(c))) 92 ref_out = rt.make_nd_memref_descriptor(2, ctypes.c_double)() 93 mem_out = ctypes.pointer(ctypes.pointer(ref_out))
|
| H A D | test_SDDMM.py | 4 import ctypes 92 mem_a = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(a))) 93 mem_b = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(b))) 94 mem_c = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(c))) 98 ref_out = rt.make_nd_memref_descriptor(2, ctypes.c_double)() 99 mem_out = ctypes.pointer(ctypes.pointer(ref_out))
|
| H A D | test_output.py | 4 import ctypes 60 mem_a = ctypes.pointer(ctypes.pointer(ctypes.create_string_buffer(buf)))
|
| H A D | test_stress.py | 4 import ctypes 161 mem_arg0 = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(np_arg0))) 162 mem_out = ctypes.pointer(ctypes.pointer(rt.get_ranked_memref_descriptor(np_out)))
|
| /llvm-project-15.0.7/polly/lib/External/isl/imath/tests/gmp-compat-test/ |
| H A D | runtest.py | 5 import ctypes 57 call_args.append(ctypes.c_ulong(int(input_args[i]))) 59 call_args.append(ctypes.c_long(int(input_args[i]))) 61 call_args.append(ctypes.c_void_p(None)) 63 call_args.append(ctypes.c_size_t(int(input_args[i]))) 65 call_args.append(ctypes.c_int(int(input_args[i]))) 69 call_args.append(ctypes.c_void_p(None)) 119 gmp_test_so = ctypes.cdll.LoadLibrary("gmp_test.so") 120 imath_test_so = ctypes.cdll.LoadLibrary("imath_test.so")
|
| /llvm-project-15.0.7/lldb/examples/summaries/cocoa/ |
| H A D | NSNumber.py | 14 import ctypes 56 str(ord(ctypes.c_char(chr(self.data % 256)).value)) 59 str(ctypes.c_short(self.data % (256 * 256)).value) 61 return '(int)' + str(ctypes.c_int(self.data % 64 return '(long)' + str(ctypes.c_long(self.data).value) 130 str(ord(ctypes.c_char(chr(data_vo.GetValueAsUnsigned(0))).value)) 136 ctypes.c_short( 146 return '(int)' + str(ctypes.c_int(data_vo.GetValueAsUnsigned(0) % 156 str(ctypes.c_long(data_vo.GetValueAsUnsigned(0)).value) 164 str(ctypes.c_long(data_vo.GetValueAsUnsigned(0)).value)
|
| /llvm-project-15.0.7/mlir/test/python/integration/dialects/linalg/ |
| H A D | opsrun.py | 3 import ctypes 229 c_float_p = ctypes.c_float * 1 270 c_float_p = ctypes.c_float * 1 382 c_int_p = ctypes.c_int * 1 417 c_int_p = ctypes.c_int * 1 444 c_int_p = ctypes.c_int * 1 471 c_int_p = ctypes.c_int * 1 501 c_int_p = ctypes.c_int * 1 537 c_int_p = ctypes.c_int * 1 568 c_int_p = ctypes.c_int * 1 [all …]
|
| /llvm-project-15.0.7/mlir/benchmark/python/ |
| H A D | benchmark_sparse.py | 5 import ctypes 93 ctypes.pointer( 94 ctypes.pointer(rt.get_ranked_memref_descriptor(argument)) 99 ctypes.pointer( 100 ctypes.pointer(rt.get_ranked_memref_descriptor(np_timers_ns))
|
| /llvm-project-15.0.7/lldb/test/API/tools/lldb-server/ |
| H A D | TestPtyServer.py | 27 libc = ctypes.CDLL(None) 28 libc.ptsname.argtypes = (ctypes.c_int,) 29 libc.ptsname.restype = ctypes.c_char_p
|
| /llvm-project-15.0.7/lld/test/ELF/ |
| H A D | link-open-file.test | 18 import ctypes 19 from ctypes import wintypes as w 37 CreateFileA = ctypes.windll.kernel32.CreateFileA 46 ctypes.windll.kernel32.CloseHandle(h)
|
| /llvm-project-15.0.7/polly/lib/External/isl/python/ |
| H A D | isl.py.top | 2 from ctypes import * 3 from ctypes.util import find_library
|