Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- llava/lib/python3.10/lib2to3/tests/__pycache__/test_util.cpython-310.pyc +0 -0
- llava/lib/python3.10/lib2to3/tests/data/bom.py +2 -0
- llava/lib/python3.10/lib2to3/tests/data/crlf.py +3 -0
- llava/lib/python3.10/lib2to3/tests/data/different_encoding.py +6 -0
- llava/lib/python3.10/lib2to3/tests/data/false_encoding.py +2 -0
- llava/lib/python3.10/lib2to3/tests/data/fixers/__pycache__/bad_order.cpython-310.pyc +0 -0
- llava/lib/python3.10/lib2to3/tests/data/fixers/no_fixer_cls.py +1 -0
- llava/lib/python3.10/lib2to3/tests/data/fixers/parrot_example.py +2 -0
- llava/lib/python3.10/lib2to3/tests/data/infinite_recursion.py +2669 -0
- llava/lib/python3.10/lib2to3/tests/data/py3_test_grammar.py +956 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_autocast_to_full_precision_compositeimplicitautograd_dispatch.h +23 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_embedding_bag_sparse_backward.h +47 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_fft_r2c_cuda_dispatch.h +25 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_addcdiv_native.h +35 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_atan_ops.h +50 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_log2_cuda_dispatch.h +24 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_sign_cuda_dispatch.h +24 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_fused_adam_cpu_dispatch.h +24 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_linalg_solve_ex_meta_dispatch.h +25 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_get_ragged_idx.h +30 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_tensor_storage_offsets_native.h +22 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_shape_as_tensor_ops.h +28 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/addbmm_meta_dispatch.h +23 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/addcdiv.h +39 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/alpha_dropout.h +35 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/argwhere.h +30 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/avg_pool2d_backward_ops.h +39 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/baddbmm.h +39 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/batch_norm_backward_elemt_cuda_dispatch.h +23 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/celu_compositeexplicitautograd_dispatch.h +26 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/cholesky_inverse_ops.h +39 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/cudnn_affine_grid_generator_backward_native.h +22 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/cudnn_convolution_relu.h +91 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/cummin_native.h +24 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/diagonal_copy_native.h +22 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/embedding_backward.h +47 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/expand_copy_compositeexplicitautograd_dispatch.h +26 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/from_file.h +43 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/glu_jvp.h +39 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/grid_sampler_3d_backward_ops.h +39 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/huber_loss_backward_native.h +22 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/index_cuda_dispatch.h +25 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/infinitely_differentiable_gelu_backward_compositeimplicitautograd_dispatch.h +23 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/inner_compositeimplicitautograd_dispatch.h +25 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/leaky_relu_backward_meta_dispatch.h +25 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/less_ops.h +83 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_cond_native.h +24 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_cond_ops.h +61 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_ldl_factor_compositeimplicitautograd_dispatch.h +25 -0
- parrot/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_lstsq_cuda_dispatch.h +24 -0
llava/lib/python3.10/lib2to3/tests/__pycache__/test_util.cpython-310.pyc
ADDED
|
Binary file (19.5 kB). View file
|
|
|
llava/lib/python3.10/lib2to3/tests/data/bom.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding: utf-8
|
| 2 |
+
print "BOM BOOM!"
|
llava/lib/python3.10/lib2to3/tests/data/crlf.py
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
print "hi"
|
| 2 |
+
|
| 3 |
+
print "Like bad Windows newlines?"
|
llava/lib/python3.10/lib2to3/tests/data/different_encoding.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
print u'ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'
|
| 4 |
+
|
| 5 |
+
def f(x):
|
| 6 |
+
print '%s\t-> α(%2i):%s β(%s)'
|
llava/lib/python3.10/lib2to3/tests/data/false_encoding.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
print '#coding=0'
|
llava/lib/python3.10/lib2to3/tests/data/fixers/__pycache__/bad_order.cpython-310.pyc
ADDED
|
Binary file (635 Bytes). View file
|
|
|
llava/lib/python3.10/lib2to3/tests/data/fixers/no_fixer_cls.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# This is empty so trying to fetch the fixer class gives an AttributeError
|
llava/lib/python3.10/lib2to3/tests/data/fixers/parrot_example.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
def parrot():
|
| 2 |
+
pass
|
llava/lib/python3.10/lib2to3/tests/data/infinite_recursion.py
ADDED
|
@@ -0,0 +1,2669 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Verify that 2to3 falls back from the recursive pattern matching scheme to a
|
| 2 |
+
# slower, iterative scheme in the event of a RecursionError.
|
| 3 |
+
from ctypes import *
|
| 4 |
+
STRING = c_char_p
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
OSUnknownByteOrder = 0
|
| 8 |
+
UIT_PROMPT = 1
|
| 9 |
+
P_PGID = 2
|
| 10 |
+
P_PID = 1
|
| 11 |
+
UIT_ERROR = 5
|
| 12 |
+
UIT_INFO = 4
|
| 13 |
+
UIT_NONE = 0
|
| 14 |
+
P_ALL = 0
|
| 15 |
+
UIT_VERIFY = 2
|
| 16 |
+
OSBigEndian = 2
|
| 17 |
+
UIT_BOOLEAN = 3
|
| 18 |
+
OSLittleEndian = 1
|
| 19 |
+
__darwin_nl_item = c_int
|
| 20 |
+
__darwin_wctrans_t = c_int
|
| 21 |
+
__darwin_wctype_t = c_ulong
|
| 22 |
+
__int8_t = c_byte
|
| 23 |
+
__uint8_t = c_ubyte
|
| 24 |
+
__int16_t = c_short
|
| 25 |
+
__uint16_t = c_ushort
|
| 26 |
+
__int32_t = c_int
|
| 27 |
+
__uint32_t = c_uint
|
| 28 |
+
__int64_t = c_longlong
|
| 29 |
+
__uint64_t = c_ulonglong
|
| 30 |
+
__darwin_intptr_t = c_long
|
| 31 |
+
__darwin_natural_t = c_uint
|
| 32 |
+
__darwin_ct_rune_t = c_int
|
| 33 |
+
class __mbstate_t(Union):
|
| 34 |
+
pass
|
| 35 |
+
__mbstate_t._pack_ = 4
|
| 36 |
+
__mbstate_t._fields_ = [
|
| 37 |
+
('__mbstate8', c_char * 128),
|
| 38 |
+
('_mbstateL', c_longlong),
|
| 39 |
+
]
|
| 40 |
+
assert sizeof(__mbstate_t) == 128, sizeof(__mbstate_t)
|
| 41 |
+
assert alignment(__mbstate_t) == 4, alignment(__mbstate_t)
|
| 42 |
+
__darwin_mbstate_t = __mbstate_t
|
| 43 |
+
__darwin_ptrdiff_t = c_int
|
| 44 |
+
__darwin_size_t = c_ulong
|
| 45 |
+
__darwin_va_list = STRING
|
| 46 |
+
__darwin_wchar_t = c_int
|
| 47 |
+
__darwin_rune_t = __darwin_wchar_t
|
| 48 |
+
__darwin_wint_t = c_int
|
| 49 |
+
__darwin_clock_t = c_ulong
|
| 50 |
+
__darwin_socklen_t = __uint32_t
|
| 51 |
+
__darwin_ssize_t = c_long
|
| 52 |
+
__darwin_time_t = c_long
|
| 53 |
+
sig_atomic_t = c_int
|
| 54 |
+
class sigcontext(Structure):
|
| 55 |
+
pass
|
| 56 |
+
sigcontext._fields_ = [
|
| 57 |
+
('sc_onstack', c_int),
|
| 58 |
+
('sc_mask', c_int),
|
| 59 |
+
('sc_eax', c_uint),
|
| 60 |
+
('sc_ebx', c_uint),
|
| 61 |
+
('sc_ecx', c_uint),
|
| 62 |
+
('sc_edx', c_uint),
|
| 63 |
+
('sc_edi', c_uint),
|
| 64 |
+
('sc_esi', c_uint),
|
| 65 |
+
('sc_ebp', c_uint),
|
| 66 |
+
('sc_esp', c_uint),
|
| 67 |
+
('sc_ss', c_uint),
|
| 68 |
+
('sc_eflags', c_uint),
|
| 69 |
+
('sc_eip', c_uint),
|
| 70 |
+
('sc_cs', c_uint),
|
| 71 |
+
('sc_ds', c_uint),
|
| 72 |
+
('sc_es', c_uint),
|
| 73 |
+
('sc_fs', c_uint),
|
| 74 |
+
('sc_gs', c_uint),
|
| 75 |
+
]
|
| 76 |
+
assert sizeof(sigcontext) == 72, sizeof(sigcontext)
|
| 77 |
+
assert alignment(sigcontext) == 4, alignment(sigcontext)
|
| 78 |
+
u_int8_t = c_ubyte
|
| 79 |
+
u_int16_t = c_ushort
|
| 80 |
+
u_int32_t = c_uint
|
| 81 |
+
u_int64_t = c_ulonglong
|
| 82 |
+
int32_t = c_int
|
| 83 |
+
register_t = int32_t
|
| 84 |
+
user_addr_t = u_int64_t
|
| 85 |
+
user_size_t = u_int64_t
|
| 86 |
+
int64_t = c_longlong
|
| 87 |
+
user_ssize_t = int64_t
|
| 88 |
+
user_long_t = int64_t
|
| 89 |
+
user_ulong_t = u_int64_t
|
| 90 |
+
user_time_t = int64_t
|
| 91 |
+
syscall_arg_t = u_int64_t
|
| 92 |
+
|
| 93 |
+
# values for unnamed enumeration
|
| 94 |
+
class aes_key_st(Structure):
|
| 95 |
+
pass
|
| 96 |
+
aes_key_st._fields_ = [
|
| 97 |
+
('rd_key', c_ulong * 60),
|
| 98 |
+
('rounds', c_int),
|
| 99 |
+
]
|
| 100 |
+
assert sizeof(aes_key_st) == 244, sizeof(aes_key_st)
|
| 101 |
+
assert alignment(aes_key_st) == 4, alignment(aes_key_st)
|
| 102 |
+
AES_KEY = aes_key_st
|
| 103 |
+
class asn1_ctx_st(Structure):
|
| 104 |
+
pass
|
| 105 |
+
asn1_ctx_st._fields_ = [
|
| 106 |
+
('p', POINTER(c_ubyte)),
|
| 107 |
+
('eos', c_int),
|
| 108 |
+
('error', c_int),
|
| 109 |
+
('inf', c_int),
|
| 110 |
+
('tag', c_int),
|
| 111 |
+
('xclass', c_int),
|
| 112 |
+
('slen', c_long),
|
| 113 |
+
('max', POINTER(c_ubyte)),
|
| 114 |
+
('q', POINTER(c_ubyte)),
|
| 115 |
+
('pp', POINTER(POINTER(c_ubyte))),
|
| 116 |
+
('line', c_int),
|
| 117 |
+
]
|
| 118 |
+
assert sizeof(asn1_ctx_st) == 44, sizeof(asn1_ctx_st)
|
| 119 |
+
assert alignment(asn1_ctx_st) == 4, alignment(asn1_ctx_st)
|
| 120 |
+
ASN1_CTX = asn1_ctx_st
|
| 121 |
+
class asn1_object_st(Structure):
|
| 122 |
+
pass
|
| 123 |
+
asn1_object_st._fields_ = [
|
| 124 |
+
('sn', STRING),
|
| 125 |
+
('ln', STRING),
|
| 126 |
+
('nid', c_int),
|
| 127 |
+
('length', c_int),
|
| 128 |
+
('data', POINTER(c_ubyte)),
|
| 129 |
+
('flags', c_int),
|
| 130 |
+
]
|
| 131 |
+
assert sizeof(asn1_object_st) == 24, sizeof(asn1_object_st)
|
| 132 |
+
assert alignment(asn1_object_st) == 4, alignment(asn1_object_st)
|
| 133 |
+
ASN1_OBJECT = asn1_object_st
|
| 134 |
+
class asn1_string_st(Structure):
|
| 135 |
+
pass
|
| 136 |
+
asn1_string_st._fields_ = [
|
| 137 |
+
('length', c_int),
|
| 138 |
+
('type', c_int),
|
| 139 |
+
('data', POINTER(c_ubyte)),
|
| 140 |
+
('flags', c_long),
|
| 141 |
+
]
|
| 142 |
+
assert sizeof(asn1_string_st) == 16, sizeof(asn1_string_st)
|
| 143 |
+
assert alignment(asn1_string_st) == 4, alignment(asn1_string_st)
|
| 144 |
+
ASN1_STRING = asn1_string_st
|
| 145 |
+
class ASN1_ENCODING_st(Structure):
|
| 146 |
+
pass
|
| 147 |
+
ASN1_ENCODING_st._fields_ = [
|
| 148 |
+
('enc', POINTER(c_ubyte)),
|
| 149 |
+
('len', c_long),
|
| 150 |
+
('modified', c_int),
|
| 151 |
+
]
|
| 152 |
+
assert sizeof(ASN1_ENCODING_st) == 12, sizeof(ASN1_ENCODING_st)
|
| 153 |
+
assert alignment(ASN1_ENCODING_st) == 4, alignment(ASN1_ENCODING_st)
|
| 154 |
+
ASN1_ENCODING = ASN1_ENCODING_st
|
| 155 |
+
class asn1_string_table_st(Structure):
|
| 156 |
+
pass
|
| 157 |
+
asn1_string_table_st._fields_ = [
|
| 158 |
+
('nid', c_int),
|
| 159 |
+
('minsize', c_long),
|
| 160 |
+
('maxsize', c_long),
|
| 161 |
+
('mask', c_ulong),
|
| 162 |
+
('flags', c_ulong),
|
| 163 |
+
]
|
| 164 |
+
assert sizeof(asn1_string_table_st) == 20, sizeof(asn1_string_table_st)
|
| 165 |
+
assert alignment(asn1_string_table_st) == 4, alignment(asn1_string_table_st)
|
| 166 |
+
ASN1_STRING_TABLE = asn1_string_table_st
|
| 167 |
+
class ASN1_TEMPLATE_st(Structure):
|
| 168 |
+
pass
|
| 169 |
+
ASN1_TEMPLATE_st._fields_ = [
|
| 170 |
+
]
|
| 171 |
+
ASN1_TEMPLATE = ASN1_TEMPLATE_st
|
| 172 |
+
class ASN1_ITEM_st(Structure):
|
| 173 |
+
pass
|
| 174 |
+
ASN1_ITEM = ASN1_ITEM_st
|
| 175 |
+
ASN1_ITEM_st._fields_ = [
|
| 176 |
+
]
|
| 177 |
+
class ASN1_TLC_st(Structure):
|
| 178 |
+
pass
|
| 179 |
+
ASN1_TLC = ASN1_TLC_st
|
| 180 |
+
ASN1_TLC_st._fields_ = [
|
| 181 |
+
]
|
| 182 |
+
class ASN1_VALUE_st(Structure):
|
| 183 |
+
pass
|
| 184 |
+
ASN1_VALUE_st._fields_ = [
|
| 185 |
+
]
|
| 186 |
+
ASN1_VALUE = ASN1_VALUE_st
|
| 187 |
+
ASN1_ITEM_EXP = ASN1_ITEM
|
| 188 |
+
class asn1_type_st(Structure):
|
| 189 |
+
pass
|
| 190 |
+
class N12asn1_type_st4DOLLAR_11E(Union):
|
| 191 |
+
pass
|
| 192 |
+
ASN1_BOOLEAN = c_int
|
| 193 |
+
ASN1_INTEGER = asn1_string_st
|
| 194 |
+
ASN1_ENUMERATED = asn1_string_st
|
| 195 |
+
ASN1_BIT_STRING = asn1_string_st
|
| 196 |
+
ASN1_OCTET_STRING = asn1_string_st
|
| 197 |
+
ASN1_PRINTABLESTRING = asn1_string_st
|
| 198 |
+
ASN1_T61STRING = asn1_string_st
|
| 199 |
+
ASN1_IA5STRING = asn1_string_st
|
| 200 |
+
ASN1_GENERALSTRING = asn1_string_st
|
| 201 |
+
ASN1_BMPSTRING = asn1_string_st
|
| 202 |
+
ASN1_UNIVERSALSTRING = asn1_string_st
|
| 203 |
+
ASN1_UTCTIME = asn1_string_st
|
| 204 |
+
ASN1_GENERALIZEDTIME = asn1_string_st
|
| 205 |
+
ASN1_VISIBLESTRING = asn1_string_st
|
| 206 |
+
ASN1_UTF8STRING = asn1_string_st
|
| 207 |
+
N12asn1_type_st4DOLLAR_11E._fields_ = [
|
| 208 |
+
('ptr', STRING),
|
| 209 |
+
('boolean', ASN1_BOOLEAN),
|
| 210 |
+
('asn1_string', POINTER(ASN1_STRING)),
|
| 211 |
+
('object', POINTER(ASN1_OBJECT)),
|
| 212 |
+
('integer', POINTER(ASN1_INTEGER)),
|
| 213 |
+
('enumerated', POINTER(ASN1_ENUMERATED)),
|
| 214 |
+
('bit_string', POINTER(ASN1_BIT_STRING)),
|
| 215 |
+
('octet_string', POINTER(ASN1_OCTET_STRING)),
|
| 216 |
+
('printablestring', POINTER(ASN1_PRINTABLESTRING)),
|
| 217 |
+
('t61string', POINTER(ASN1_T61STRING)),
|
| 218 |
+
('ia5string', POINTER(ASN1_IA5STRING)),
|
| 219 |
+
('generalstring', POINTER(ASN1_GENERALSTRING)),
|
| 220 |
+
('bmpstring', POINTER(ASN1_BMPSTRING)),
|
| 221 |
+
('universalstring', POINTER(ASN1_UNIVERSALSTRING)),
|
| 222 |
+
('utctime', POINTER(ASN1_UTCTIME)),
|
| 223 |
+
('generalizedtime', POINTER(ASN1_GENERALIZEDTIME)),
|
| 224 |
+
('visiblestring', POINTER(ASN1_VISIBLESTRING)),
|
| 225 |
+
('utf8string', POINTER(ASN1_UTF8STRING)),
|
| 226 |
+
('set', POINTER(ASN1_STRING)),
|
| 227 |
+
('sequence', POINTER(ASN1_STRING)),
|
| 228 |
+
]
|
| 229 |
+
assert sizeof(N12asn1_type_st4DOLLAR_11E) == 4, sizeof(N12asn1_type_st4DOLLAR_11E)
|
| 230 |
+
assert alignment(N12asn1_type_st4DOLLAR_11E) == 4, alignment(N12asn1_type_st4DOLLAR_11E)
|
| 231 |
+
asn1_type_st._fields_ = [
|
| 232 |
+
('type', c_int),
|
| 233 |
+
('value', N12asn1_type_st4DOLLAR_11E),
|
| 234 |
+
]
|
| 235 |
+
assert sizeof(asn1_type_st) == 8, sizeof(asn1_type_st)
|
| 236 |
+
assert alignment(asn1_type_st) == 4, alignment(asn1_type_st)
|
| 237 |
+
ASN1_TYPE = asn1_type_st
|
| 238 |
+
class asn1_method_st(Structure):
|
| 239 |
+
pass
|
| 240 |
+
asn1_method_st._fields_ = [
|
| 241 |
+
('i2d', CFUNCTYPE(c_int)),
|
| 242 |
+
('d2i', CFUNCTYPE(STRING)),
|
| 243 |
+
('create', CFUNCTYPE(STRING)),
|
| 244 |
+
('destroy', CFUNCTYPE(None)),
|
| 245 |
+
]
|
| 246 |
+
assert sizeof(asn1_method_st) == 16, sizeof(asn1_method_st)
|
| 247 |
+
assert alignment(asn1_method_st) == 4, alignment(asn1_method_st)
|
| 248 |
+
ASN1_METHOD = asn1_method_st
|
| 249 |
+
class asn1_header_st(Structure):
|
| 250 |
+
pass
|
| 251 |
+
asn1_header_st._fields_ = [
|
| 252 |
+
('header', POINTER(ASN1_OCTET_STRING)),
|
| 253 |
+
('data', STRING),
|
| 254 |
+
('meth', POINTER(ASN1_METHOD)),
|
| 255 |
+
]
|
| 256 |
+
assert sizeof(asn1_header_st) == 12, sizeof(asn1_header_st)
|
| 257 |
+
assert alignment(asn1_header_st) == 4, alignment(asn1_header_st)
|
| 258 |
+
ASN1_HEADER = asn1_header_st
|
| 259 |
+
class BIT_STRING_BITNAME_st(Structure):
|
| 260 |
+
pass
|
| 261 |
+
BIT_STRING_BITNAME_st._fields_ = [
|
| 262 |
+
('bitnum', c_int),
|
| 263 |
+
('lname', STRING),
|
| 264 |
+
('sname', STRING),
|
| 265 |
+
]
|
| 266 |
+
assert sizeof(BIT_STRING_BITNAME_st) == 12, sizeof(BIT_STRING_BITNAME_st)
|
| 267 |
+
assert alignment(BIT_STRING_BITNAME_st) == 4, alignment(BIT_STRING_BITNAME_st)
|
| 268 |
+
BIT_STRING_BITNAME = BIT_STRING_BITNAME_st
|
| 269 |
+
class bio_st(Structure):
|
| 270 |
+
pass
|
| 271 |
+
BIO = bio_st
|
| 272 |
+
bio_info_cb = CFUNCTYPE(None, POINTER(bio_st), c_int, STRING, c_int, c_long, c_long)
|
| 273 |
+
class bio_method_st(Structure):
|
| 274 |
+
pass
|
| 275 |
+
bio_method_st._fields_ = [
|
| 276 |
+
('type', c_int),
|
| 277 |
+
('name', STRING),
|
| 278 |
+
('bwrite', CFUNCTYPE(c_int, POINTER(BIO), STRING, c_int)),
|
| 279 |
+
('bread', CFUNCTYPE(c_int, POINTER(BIO), STRING, c_int)),
|
| 280 |
+
('bputs', CFUNCTYPE(c_int, POINTER(BIO), STRING)),
|
| 281 |
+
('bgets', CFUNCTYPE(c_int, POINTER(BIO), STRING, c_int)),
|
| 282 |
+
('ctrl', CFUNCTYPE(c_long, POINTER(BIO), c_int, c_long, c_void_p)),
|
| 283 |
+
('create', CFUNCTYPE(c_int, POINTER(BIO))),
|
| 284 |
+
('destroy', CFUNCTYPE(c_int, POINTER(BIO))),
|
| 285 |
+
('callback_ctrl', CFUNCTYPE(c_long, POINTER(BIO), c_int, POINTER(bio_info_cb))),
|
| 286 |
+
]
|
| 287 |
+
assert sizeof(bio_method_st) == 40, sizeof(bio_method_st)
|
| 288 |
+
assert alignment(bio_method_st) == 4, alignment(bio_method_st)
|
| 289 |
+
BIO_METHOD = bio_method_st
|
| 290 |
+
class crypto_ex_data_st(Structure):
|
| 291 |
+
pass
|
| 292 |
+
class stack_st(Structure):
|
| 293 |
+
pass
|
| 294 |
+
STACK = stack_st
|
| 295 |
+
crypto_ex_data_st._fields_ = [
|
| 296 |
+
('sk', POINTER(STACK)),
|
| 297 |
+
('dummy', c_int),
|
| 298 |
+
]
|
| 299 |
+
assert sizeof(crypto_ex_data_st) == 8, sizeof(crypto_ex_data_st)
|
| 300 |
+
assert alignment(crypto_ex_data_st) == 4, alignment(crypto_ex_data_st)
|
| 301 |
+
CRYPTO_EX_DATA = crypto_ex_data_st
|
| 302 |
+
bio_st._fields_ = [
|
| 303 |
+
('method', POINTER(BIO_METHOD)),
|
| 304 |
+
('callback', CFUNCTYPE(c_long, POINTER(bio_st), c_int, STRING, c_int, c_long, c_long)),
|
| 305 |
+
('cb_arg', STRING),
|
| 306 |
+
('init', c_int),
|
| 307 |
+
('shutdown', c_int),
|
| 308 |
+
('flags', c_int),
|
| 309 |
+
('retry_reason', c_int),
|
| 310 |
+
('num', c_int),
|
| 311 |
+
('ptr', c_void_p),
|
| 312 |
+
('next_bio', POINTER(bio_st)),
|
| 313 |
+
('prev_bio', POINTER(bio_st)),
|
| 314 |
+
('references', c_int),
|
| 315 |
+
('num_read', c_ulong),
|
| 316 |
+
('num_write', c_ulong),
|
| 317 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 318 |
+
]
|
| 319 |
+
assert sizeof(bio_st) == 64, sizeof(bio_st)
|
| 320 |
+
assert alignment(bio_st) == 4, alignment(bio_st)
|
| 321 |
+
class bio_f_buffer_ctx_struct(Structure):
|
| 322 |
+
pass
|
| 323 |
+
bio_f_buffer_ctx_struct._fields_ = [
|
| 324 |
+
('ibuf_size', c_int),
|
| 325 |
+
('obuf_size', c_int),
|
| 326 |
+
('ibuf', STRING),
|
| 327 |
+
('ibuf_len', c_int),
|
| 328 |
+
('ibuf_off', c_int),
|
| 329 |
+
('obuf', STRING),
|
| 330 |
+
('obuf_len', c_int),
|
| 331 |
+
('obuf_off', c_int),
|
| 332 |
+
]
|
| 333 |
+
assert sizeof(bio_f_buffer_ctx_struct) == 32, sizeof(bio_f_buffer_ctx_struct)
|
| 334 |
+
assert alignment(bio_f_buffer_ctx_struct) == 4, alignment(bio_f_buffer_ctx_struct)
|
| 335 |
+
BIO_F_BUFFER_CTX = bio_f_buffer_ctx_struct
|
| 336 |
+
class hostent(Structure):
|
| 337 |
+
pass
|
| 338 |
+
hostent._fields_ = [
|
| 339 |
+
]
|
| 340 |
+
class bf_key_st(Structure):
|
| 341 |
+
pass
|
| 342 |
+
bf_key_st._fields_ = [
|
| 343 |
+
('P', c_uint * 18),
|
| 344 |
+
('S', c_uint * 1024),
|
| 345 |
+
]
|
| 346 |
+
assert sizeof(bf_key_st) == 4168, sizeof(bf_key_st)
|
| 347 |
+
assert alignment(bf_key_st) == 4, alignment(bf_key_st)
|
| 348 |
+
BF_KEY = bf_key_st
|
| 349 |
+
class bignum_st(Structure):
|
| 350 |
+
pass
|
| 351 |
+
bignum_st._fields_ = [
|
| 352 |
+
('d', POINTER(c_ulong)),
|
| 353 |
+
('top', c_int),
|
| 354 |
+
('dmax', c_int),
|
| 355 |
+
('neg', c_int),
|
| 356 |
+
('flags', c_int),
|
| 357 |
+
]
|
| 358 |
+
assert sizeof(bignum_st) == 20, sizeof(bignum_st)
|
| 359 |
+
assert alignment(bignum_st) == 4, alignment(bignum_st)
|
| 360 |
+
BIGNUM = bignum_st
|
| 361 |
+
class bignum_ctx(Structure):
|
| 362 |
+
pass
|
| 363 |
+
bignum_ctx._fields_ = [
|
| 364 |
+
]
|
| 365 |
+
BN_CTX = bignum_ctx
|
| 366 |
+
class bn_blinding_st(Structure):
|
| 367 |
+
pass
|
| 368 |
+
bn_blinding_st._fields_ = [
|
| 369 |
+
('init', c_int),
|
| 370 |
+
('A', POINTER(BIGNUM)),
|
| 371 |
+
('Ai', POINTER(BIGNUM)),
|
| 372 |
+
('mod', POINTER(BIGNUM)),
|
| 373 |
+
('thread_id', c_ulong),
|
| 374 |
+
]
|
| 375 |
+
assert sizeof(bn_blinding_st) == 20, sizeof(bn_blinding_st)
|
| 376 |
+
assert alignment(bn_blinding_st) == 4, alignment(bn_blinding_st)
|
| 377 |
+
BN_BLINDING = bn_blinding_st
|
| 378 |
+
class bn_mont_ctx_st(Structure):
|
| 379 |
+
pass
|
| 380 |
+
bn_mont_ctx_st._fields_ = [
|
| 381 |
+
('ri', c_int),
|
| 382 |
+
('RR', BIGNUM),
|
| 383 |
+
('N', BIGNUM),
|
| 384 |
+
('Ni', BIGNUM),
|
| 385 |
+
('n0', c_ulong),
|
| 386 |
+
('flags', c_int),
|
| 387 |
+
]
|
| 388 |
+
assert sizeof(bn_mont_ctx_st) == 72, sizeof(bn_mont_ctx_st)
|
| 389 |
+
assert alignment(bn_mont_ctx_st) == 4, alignment(bn_mont_ctx_st)
|
| 390 |
+
BN_MONT_CTX = bn_mont_ctx_st
|
| 391 |
+
class bn_recp_ctx_st(Structure):
|
| 392 |
+
pass
|
| 393 |
+
bn_recp_ctx_st._fields_ = [
|
| 394 |
+
('N', BIGNUM),
|
| 395 |
+
('Nr', BIGNUM),
|
| 396 |
+
('num_bits', c_int),
|
| 397 |
+
('shift', c_int),
|
| 398 |
+
('flags', c_int),
|
| 399 |
+
]
|
| 400 |
+
assert sizeof(bn_recp_ctx_st) == 52, sizeof(bn_recp_ctx_st)
|
| 401 |
+
assert alignment(bn_recp_ctx_st) == 4, alignment(bn_recp_ctx_st)
|
| 402 |
+
BN_RECP_CTX = bn_recp_ctx_st
|
| 403 |
+
class buf_mem_st(Structure):
|
| 404 |
+
pass
|
| 405 |
+
buf_mem_st._fields_ = [
|
| 406 |
+
('length', c_int),
|
| 407 |
+
('data', STRING),
|
| 408 |
+
('max', c_int),
|
| 409 |
+
]
|
| 410 |
+
assert sizeof(buf_mem_st) == 12, sizeof(buf_mem_st)
|
| 411 |
+
assert alignment(buf_mem_st) == 4, alignment(buf_mem_st)
|
| 412 |
+
BUF_MEM = buf_mem_st
|
| 413 |
+
class cast_key_st(Structure):
|
| 414 |
+
pass
|
| 415 |
+
cast_key_st._fields_ = [
|
| 416 |
+
('data', c_ulong * 32),
|
| 417 |
+
('short_key', c_int),
|
| 418 |
+
]
|
| 419 |
+
assert sizeof(cast_key_st) == 132, sizeof(cast_key_st)
|
| 420 |
+
assert alignment(cast_key_st) == 4, alignment(cast_key_st)
|
| 421 |
+
CAST_KEY = cast_key_st
|
| 422 |
+
class comp_method_st(Structure):
|
| 423 |
+
pass
|
| 424 |
+
comp_method_st._fields_ = [
|
| 425 |
+
('type', c_int),
|
| 426 |
+
('name', STRING),
|
| 427 |
+
('init', CFUNCTYPE(c_int)),
|
| 428 |
+
('finish', CFUNCTYPE(None)),
|
| 429 |
+
('compress', CFUNCTYPE(c_int)),
|
| 430 |
+
('expand', CFUNCTYPE(c_int)),
|
| 431 |
+
('ctrl', CFUNCTYPE(c_long)),
|
| 432 |
+
('callback_ctrl', CFUNCTYPE(c_long)),
|
| 433 |
+
]
|
| 434 |
+
assert sizeof(comp_method_st) == 32, sizeof(comp_method_st)
|
| 435 |
+
assert alignment(comp_method_st) == 4, alignment(comp_method_st)
|
| 436 |
+
COMP_METHOD = comp_method_st
|
| 437 |
+
class comp_ctx_st(Structure):
|
| 438 |
+
pass
|
| 439 |
+
comp_ctx_st._fields_ = [
|
| 440 |
+
('meth', POINTER(COMP_METHOD)),
|
| 441 |
+
('compress_in', c_ulong),
|
| 442 |
+
('compress_out', c_ulong),
|
| 443 |
+
('expand_in', c_ulong),
|
| 444 |
+
('expand_out', c_ulong),
|
| 445 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 446 |
+
]
|
| 447 |
+
assert sizeof(comp_ctx_st) == 28, sizeof(comp_ctx_st)
|
| 448 |
+
assert alignment(comp_ctx_st) == 4, alignment(comp_ctx_st)
|
| 449 |
+
COMP_CTX = comp_ctx_st
|
| 450 |
+
class CRYPTO_dynlock_value(Structure):
|
| 451 |
+
pass
|
| 452 |
+
CRYPTO_dynlock_value._fields_ = [
|
| 453 |
+
]
|
| 454 |
+
class CRYPTO_dynlock(Structure):
|
| 455 |
+
pass
|
| 456 |
+
CRYPTO_dynlock._fields_ = [
|
| 457 |
+
('references', c_int),
|
| 458 |
+
('data', POINTER(CRYPTO_dynlock_value)),
|
| 459 |
+
]
|
| 460 |
+
assert sizeof(CRYPTO_dynlock) == 8, sizeof(CRYPTO_dynlock)
|
| 461 |
+
assert alignment(CRYPTO_dynlock) == 4, alignment(CRYPTO_dynlock)
|
| 462 |
+
BIO_dummy = bio_st
|
| 463 |
+
CRYPTO_EX_new = CFUNCTYPE(c_int, c_void_p, c_void_p, POINTER(CRYPTO_EX_DATA), c_int, c_long, c_void_p)
|
| 464 |
+
CRYPTO_EX_free = CFUNCTYPE(None, c_void_p, c_void_p, POINTER(CRYPTO_EX_DATA), c_int, c_long, c_void_p)
|
| 465 |
+
CRYPTO_EX_dup = CFUNCTYPE(c_int, POINTER(CRYPTO_EX_DATA), POINTER(CRYPTO_EX_DATA), c_void_p, c_int, c_long, c_void_p)
|
| 466 |
+
class crypto_ex_data_func_st(Structure):
|
| 467 |
+
pass
|
| 468 |
+
crypto_ex_data_func_st._fields_ = [
|
| 469 |
+
('argl', c_long),
|
| 470 |
+
('argp', c_void_p),
|
| 471 |
+
('new_func', POINTER(CRYPTO_EX_new)),
|
| 472 |
+
('free_func', POINTER(CRYPTO_EX_free)),
|
| 473 |
+
('dup_func', POINTER(CRYPTO_EX_dup)),
|
| 474 |
+
]
|
| 475 |
+
assert sizeof(crypto_ex_data_func_st) == 20, sizeof(crypto_ex_data_func_st)
|
| 476 |
+
assert alignment(crypto_ex_data_func_st) == 4, alignment(crypto_ex_data_func_st)
|
| 477 |
+
CRYPTO_EX_DATA_FUNCS = crypto_ex_data_func_st
|
| 478 |
+
class st_CRYPTO_EX_DATA_IMPL(Structure):
|
| 479 |
+
pass
|
| 480 |
+
CRYPTO_EX_DATA_IMPL = st_CRYPTO_EX_DATA_IMPL
|
| 481 |
+
st_CRYPTO_EX_DATA_IMPL._fields_ = [
|
| 482 |
+
]
|
| 483 |
+
CRYPTO_MEM_LEAK_CB = CFUNCTYPE(c_void_p, c_ulong, STRING, c_int, c_int, c_void_p)
|
| 484 |
+
DES_cblock = c_ubyte * 8
|
| 485 |
+
const_DES_cblock = c_ubyte * 8
|
| 486 |
+
class DES_ks(Structure):
|
| 487 |
+
pass
|
| 488 |
+
class N6DES_ks3DOLLAR_9E(Union):
|
| 489 |
+
pass
|
| 490 |
+
N6DES_ks3DOLLAR_9E._fields_ = [
|
| 491 |
+
('cblock', DES_cblock),
|
| 492 |
+
('deslong', c_ulong * 2),
|
| 493 |
+
]
|
| 494 |
+
assert sizeof(N6DES_ks3DOLLAR_9E) == 8, sizeof(N6DES_ks3DOLLAR_9E)
|
| 495 |
+
assert alignment(N6DES_ks3DOLLAR_9E) == 4, alignment(N6DES_ks3DOLLAR_9E)
|
| 496 |
+
DES_ks._fields_ = [
|
| 497 |
+
('ks', N6DES_ks3DOLLAR_9E * 16),
|
| 498 |
+
]
|
| 499 |
+
assert sizeof(DES_ks) == 128, sizeof(DES_ks)
|
| 500 |
+
assert alignment(DES_ks) == 4, alignment(DES_ks)
|
| 501 |
+
DES_key_schedule = DES_ks
|
| 502 |
+
_ossl_old_des_cblock = c_ubyte * 8
|
| 503 |
+
class _ossl_old_des_ks_struct(Structure):
|
| 504 |
+
pass
|
| 505 |
+
class N23_ossl_old_des_ks_struct4DOLLAR_10E(Union):
|
| 506 |
+
pass
|
| 507 |
+
N23_ossl_old_des_ks_struct4DOLLAR_10E._fields_ = [
|
| 508 |
+
('_', _ossl_old_des_cblock),
|
| 509 |
+
('pad', c_ulong * 2),
|
| 510 |
+
]
|
| 511 |
+
assert sizeof(N23_ossl_old_des_ks_struct4DOLLAR_10E) == 8, sizeof(N23_ossl_old_des_ks_struct4DOLLAR_10E)
|
| 512 |
+
assert alignment(N23_ossl_old_des_ks_struct4DOLLAR_10E) == 4, alignment(N23_ossl_old_des_ks_struct4DOLLAR_10E)
|
| 513 |
+
_ossl_old_des_ks_struct._fields_ = [
|
| 514 |
+
('ks', N23_ossl_old_des_ks_struct4DOLLAR_10E),
|
| 515 |
+
]
|
| 516 |
+
assert sizeof(_ossl_old_des_ks_struct) == 8, sizeof(_ossl_old_des_ks_struct)
|
| 517 |
+
assert alignment(_ossl_old_des_ks_struct) == 4, alignment(_ossl_old_des_ks_struct)
|
| 518 |
+
_ossl_old_des_key_schedule = _ossl_old_des_ks_struct * 16
|
| 519 |
+
class dh_st(Structure):
|
| 520 |
+
pass
|
| 521 |
+
DH = dh_st
|
| 522 |
+
class dh_method(Structure):
|
| 523 |
+
pass
|
| 524 |
+
dh_method._fields_ = [
|
| 525 |
+
('name', STRING),
|
| 526 |
+
('generate_key', CFUNCTYPE(c_int, POINTER(DH))),
|
| 527 |
+
('compute_key', CFUNCTYPE(c_int, POINTER(c_ubyte), POINTER(BIGNUM), POINTER(DH))),
|
| 528 |
+
('bn_mod_exp', CFUNCTYPE(c_int, POINTER(DH), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
|
| 529 |
+
('init', CFUNCTYPE(c_int, POINTER(DH))),
|
| 530 |
+
('finish', CFUNCTYPE(c_int, POINTER(DH))),
|
| 531 |
+
('flags', c_int),
|
| 532 |
+
('app_data', STRING),
|
| 533 |
+
]
|
| 534 |
+
assert sizeof(dh_method) == 32, sizeof(dh_method)
|
| 535 |
+
assert alignment(dh_method) == 4, alignment(dh_method)
|
| 536 |
+
DH_METHOD = dh_method
|
| 537 |
+
class engine_st(Structure):
|
| 538 |
+
pass
|
| 539 |
+
ENGINE = engine_st
|
| 540 |
+
dh_st._fields_ = [
|
| 541 |
+
('pad', c_int),
|
| 542 |
+
('version', c_int),
|
| 543 |
+
('p', POINTER(BIGNUM)),
|
| 544 |
+
('g', POINTER(BIGNUM)),
|
| 545 |
+
('length', c_long),
|
| 546 |
+
('pub_key', POINTER(BIGNUM)),
|
| 547 |
+
('priv_key', POINTER(BIGNUM)),
|
| 548 |
+
('flags', c_int),
|
| 549 |
+
('method_mont_p', STRING),
|
| 550 |
+
('q', POINTER(BIGNUM)),
|
| 551 |
+
('j', POINTER(BIGNUM)),
|
| 552 |
+
('seed', POINTER(c_ubyte)),
|
| 553 |
+
('seedlen', c_int),
|
| 554 |
+
('counter', POINTER(BIGNUM)),
|
| 555 |
+
('references', c_int),
|
| 556 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 557 |
+
('meth', POINTER(DH_METHOD)),
|
| 558 |
+
('engine', POINTER(ENGINE)),
|
| 559 |
+
]
|
| 560 |
+
assert sizeof(dh_st) == 76, sizeof(dh_st)
|
| 561 |
+
assert alignment(dh_st) == 4, alignment(dh_st)
|
| 562 |
+
class dsa_st(Structure):
|
| 563 |
+
pass
|
| 564 |
+
DSA = dsa_st
|
| 565 |
+
class DSA_SIG_st(Structure):
|
| 566 |
+
pass
|
| 567 |
+
DSA_SIG_st._fields_ = [
|
| 568 |
+
('r', POINTER(BIGNUM)),
|
| 569 |
+
('s', POINTER(BIGNUM)),
|
| 570 |
+
]
|
| 571 |
+
assert sizeof(DSA_SIG_st) == 8, sizeof(DSA_SIG_st)
|
| 572 |
+
assert alignment(DSA_SIG_st) == 4, alignment(DSA_SIG_st)
|
| 573 |
+
DSA_SIG = DSA_SIG_st
|
| 574 |
+
class dsa_method(Structure):
|
| 575 |
+
pass
|
| 576 |
+
dsa_method._fields_ = [
|
| 577 |
+
('name', STRING),
|
| 578 |
+
('dsa_do_sign', CFUNCTYPE(POINTER(DSA_SIG), POINTER(c_ubyte), c_int, POINTER(DSA))),
|
| 579 |
+
('dsa_sign_setup', CFUNCTYPE(c_int, POINTER(DSA), POINTER(BN_CTX), POINTER(POINTER(BIGNUM)), POINTER(POINTER(BIGNUM)))),
|
| 580 |
+
('dsa_do_verify', CFUNCTYPE(c_int, POINTER(c_ubyte), c_int, POINTER(DSA_SIG), POINTER(DSA))),
|
| 581 |
+
('dsa_mod_exp', CFUNCTYPE(c_int, POINTER(DSA), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
|
| 582 |
+
('bn_mod_exp', CFUNCTYPE(c_int, POINTER(DSA), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
|
| 583 |
+
('init', CFUNCTYPE(c_int, POINTER(DSA))),
|
| 584 |
+
('finish', CFUNCTYPE(c_int, POINTER(DSA))),
|
| 585 |
+
('flags', c_int),
|
| 586 |
+
('app_data', STRING),
|
| 587 |
+
]
|
| 588 |
+
assert sizeof(dsa_method) == 40, sizeof(dsa_method)
|
| 589 |
+
assert alignment(dsa_method) == 4, alignment(dsa_method)
|
| 590 |
+
DSA_METHOD = dsa_method
|
| 591 |
+
dsa_st._fields_ = [
|
| 592 |
+
('pad', c_int),
|
| 593 |
+
('version', c_long),
|
| 594 |
+
('write_params', c_int),
|
| 595 |
+
('p', POINTER(BIGNUM)),
|
| 596 |
+
('q', POINTER(BIGNUM)),
|
| 597 |
+
('g', POINTER(BIGNUM)),
|
| 598 |
+
('pub_key', POINTER(BIGNUM)),
|
| 599 |
+
('priv_key', POINTER(BIGNUM)),
|
| 600 |
+
('kinv', POINTER(BIGNUM)),
|
| 601 |
+
('r', POINTER(BIGNUM)),
|
| 602 |
+
('flags', c_int),
|
| 603 |
+
('method_mont_p', STRING),
|
| 604 |
+
('references', c_int),
|
| 605 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 606 |
+
('meth', POINTER(DSA_METHOD)),
|
| 607 |
+
('engine', POINTER(ENGINE)),
|
| 608 |
+
]
|
| 609 |
+
assert sizeof(dsa_st) == 68, sizeof(dsa_st)
|
| 610 |
+
assert alignment(dsa_st) == 4, alignment(dsa_st)
|
| 611 |
+
class evp_pkey_st(Structure):
|
| 612 |
+
pass
|
| 613 |
+
class N11evp_pkey_st4DOLLAR_12E(Union):
|
| 614 |
+
pass
|
| 615 |
+
class rsa_st(Structure):
|
| 616 |
+
pass
|
| 617 |
+
N11evp_pkey_st4DOLLAR_12E._fields_ = [
|
| 618 |
+
('ptr', STRING),
|
| 619 |
+
('rsa', POINTER(rsa_st)),
|
| 620 |
+
('dsa', POINTER(dsa_st)),
|
| 621 |
+
('dh', POINTER(dh_st)),
|
| 622 |
+
]
|
| 623 |
+
assert sizeof(N11evp_pkey_st4DOLLAR_12E) == 4, sizeof(N11evp_pkey_st4DOLLAR_12E)
|
| 624 |
+
assert alignment(N11evp_pkey_st4DOLLAR_12E) == 4, alignment(N11evp_pkey_st4DOLLAR_12E)
|
| 625 |
+
evp_pkey_st._fields_ = [
|
| 626 |
+
('type', c_int),
|
| 627 |
+
('save_type', c_int),
|
| 628 |
+
('references', c_int),
|
| 629 |
+
('pkey', N11evp_pkey_st4DOLLAR_12E),
|
| 630 |
+
('save_parameters', c_int),
|
| 631 |
+
('attributes', POINTER(STACK)),
|
| 632 |
+
]
|
| 633 |
+
assert sizeof(evp_pkey_st) == 24, sizeof(evp_pkey_st)
|
| 634 |
+
assert alignment(evp_pkey_st) == 4, alignment(evp_pkey_st)
|
| 635 |
+
class env_md_st(Structure):
|
| 636 |
+
pass
|
| 637 |
+
class env_md_ctx_st(Structure):
|
| 638 |
+
pass
|
| 639 |
+
EVP_MD_CTX = env_md_ctx_st
|
| 640 |
+
env_md_st._fields_ = [
|
| 641 |
+
('type', c_int),
|
| 642 |
+
('pkey_type', c_int),
|
| 643 |
+
('md_size', c_int),
|
| 644 |
+
('flags', c_ulong),
|
| 645 |
+
('init', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX))),
|
| 646 |
+
('update', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX), c_void_p, c_ulong)),
|
| 647 |
+
('final', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX), POINTER(c_ubyte))),
|
| 648 |
+
('copy', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX), POINTER(EVP_MD_CTX))),
|
| 649 |
+
('cleanup', CFUNCTYPE(c_int, POINTER(EVP_MD_CTX))),
|
| 650 |
+
('sign', CFUNCTYPE(c_int)),
|
| 651 |
+
('verify', CFUNCTYPE(c_int)),
|
| 652 |
+
('required_pkey_type', c_int * 5),
|
| 653 |
+
('block_size', c_int),
|
| 654 |
+
('ctx_size', c_int),
|
| 655 |
+
]
|
| 656 |
+
assert sizeof(env_md_st) == 72, sizeof(env_md_st)
|
| 657 |
+
assert alignment(env_md_st) == 4, alignment(env_md_st)
|
| 658 |
+
EVP_MD = env_md_st
|
| 659 |
+
env_md_ctx_st._fields_ = [
|
| 660 |
+
('digest', POINTER(EVP_MD)),
|
| 661 |
+
('engine', POINTER(ENGINE)),
|
| 662 |
+
('flags', c_ulong),
|
| 663 |
+
('md_data', c_void_p),
|
| 664 |
+
]
|
| 665 |
+
assert sizeof(env_md_ctx_st) == 16, sizeof(env_md_ctx_st)
|
| 666 |
+
assert alignment(env_md_ctx_st) == 4, alignment(env_md_ctx_st)
|
| 667 |
+
class evp_cipher_st(Structure):
|
| 668 |
+
pass
|
| 669 |
+
class evp_cipher_ctx_st(Structure):
|
| 670 |
+
pass
|
| 671 |
+
EVP_CIPHER_CTX = evp_cipher_ctx_st
|
| 672 |
+
evp_cipher_st._fields_ = [
|
| 673 |
+
('nid', c_int),
|
| 674 |
+
('block_size', c_int),
|
| 675 |
+
('key_len', c_int),
|
| 676 |
+
('iv_len', c_int),
|
| 677 |
+
('flags', c_ulong),
|
| 678 |
+
('init', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(c_ubyte), POINTER(c_ubyte), c_int)),
|
| 679 |
+
('do_cipher', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(c_ubyte), POINTER(c_ubyte), c_uint)),
|
| 680 |
+
('cleanup', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX))),
|
| 681 |
+
('ctx_size', c_int),
|
| 682 |
+
('set_asn1_parameters', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(ASN1_TYPE))),
|
| 683 |
+
('get_asn1_parameters', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), POINTER(ASN1_TYPE))),
|
| 684 |
+
('ctrl', CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), c_int, c_int, c_void_p)),
|
| 685 |
+
('app_data', c_void_p),
|
| 686 |
+
]
|
| 687 |
+
assert sizeof(evp_cipher_st) == 52, sizeof(evp_cipher_st)
|
| 688 |
+
assert alignment(evp_cipher_st) == 4, alignment(evp_cipher_st)
|
| 689 |
+
class evp_cipher_info_st(Structure):
|
| 690 |
+
pass
|
| 691 |
+
EVP_CIPHER = evp_cipher_st
|
| 692 |
+
evp_cipher_info_st._fields_ = [
|
| 693 |
+
('cipher', POINTER(EVP_CIPHER)),
|
| 694 |
+
('iv', c_ubyte * 16),
|
| 695 |
+
]
|
| 696 |
+
assert sizeof(evp_cipher_info_st) == 20, sizeof(evp_cipher_info_st)
|
| 697 |
+
assert alignment(evp_cipher_info_st) == 4, alignment(evp_cipher_info_st)
|
| 698 |
+
EVP_CIPHER_INFO = evp_cipher_info_st
|
| 699 |
+
evp_cipher_ctx_st._fields_ = [
|
| 700 |
+
('cipher', POINTER(EVP_CIPHER)),
|
| 701 |
+
('engine', POINTER(ENGINE)),
|
| 702 |
+
('encrypt', c_int),
|
| 703 |
+
('buf_len', c_int),
|
| 704 |
+
('oiv', c_ubyte * 16),
|
| 705 |
+
('iv', c_ubyte * 16),
|
| 706 |
+
('buf', c_ubyte * 32),
|
| 707 |
+
('num', c_int),
|
| 708 |
+
('app_data', c_void_p),
|
| 709 |
+
('key_len', c_int),
|
| 710 |
+
('flags', c_ulong),
|
| 711 |
+
('cipher_data', c_void_p),
|
| 712 |
+
('final_used', c_int),
|
| 713 |
+
('block_mask', c_int),
|
| 714 |
+
('final', c_ubyte * 32),
|
| 715 |
+
]
|
| 716 |
+
assert sizeof(evp_cipher_ctx_st) == 140, sizeof(evp_cipher_ctx_st)
|
| 717 |
+
assert alignment(evp_cipher_ctx_st) == 4, alignment(evp_cipher_ctx_st)
|
| 718 |
+
class evp_Encode_Ctx_st(Structure):
|
| 719 |
+
pass
|
| 720 |
+
evp_Encode_Ctx_st._fields_ = [
|
| 721 |
+
('num', c_int),
|
| 722 |
+
('length', c_int),
|
| 723 |
+
('enc_data', c_ubyte * 80),
|
| 724 |
+
('line_num', c_int),
|
| 725 |
+
('expect_nl', c_int),
|
| 726 |
+
]
|
| 727 |
+
assert sizeof(evp_Encode_Ctx_st) == 96, sizeof(evp_Encode_Ctx_st)
|
| 728 |
+
assert alignment(evp_Encode_Ctx_st) == 4, alignment(evp_Encode_Ctx_st)
|
| 729 |
+
EVP_ENCODE_CTX = evp_Encode_Ctx_st
|
| 730 |
+
EVP_PBE_KEYGEN = CFUNCTYPE(c_int, POINTER(EVP_CIPHER_CTX), STRING, c_int, POINTER(ASN1_TYPE), POINTER(EVP_CIPHER), POINTER(EVP_MD), c_int)
|
| 731 |
+
class lhash_node_st(Structure):
|
| 732 |
+
pass
|
| 733 |
+
lhash_node_st._fields_ = [
|
| 734 |
+
('data', c_void_p),
|
| 735 |
+
('next', POINTER(lhash_node_st)),
|
| 736 |
+
('hash', c_ulong),
|
| 737 |
+
]
|
| 738 |
+
assert sizeof(lhash_node_st) == 12, sizeof(lhash_node_st)
|
| 739 |
+
assert alignment(lhash_node_st) == 4, alignment(lhash_node_st)
|
| 740 |
+
LHASH_NODE = lhash_node_st
|
| 741 |
+
LHASH_COMP_FN_TYPE = CFUNCTYPE(c_int, c_void_p, c_void_p)
|
| 742 |
+
LHASH_HASH_FN_TYPE = CFUNCTYPE(c_ulong, c_void_p)
|
| 743 |
+
LHASH_DOALL_FN_TYPE = CFUNCTYPE(None, c_void_p)
|
| 744 |
+
LHASH_DOALL_ARG_FN_TYPE = CFUNCTYPE(None, c_void_p, c_void_p)
|
| 745 |
+
class lhash_st(Structure):
|
| 746 |
+
pass
|
| 747 |
+
lhash_st._fields_ = [
|
| 748 |
+
('b', POINTER(POINTER(LHASH_NODE))),
|
| 749 |
+
('comp', LHASH_COMP_FN_TYPE),
|
| 750 |
+
('hash', LHASH_HASH_FN_TYPE),
|
| 751 |
+
('num_nodes', c_uint),
|
| 752 |
+
('num_alloc_nodes', c_uint),
|
| 753 |
+
('p', c_uint),
|
| 754 |
+
('pmax', c_uint),
|
| 755 |
+
('up_load', c_ulong),
|
| 756 |
+
('down_load', c_ulong),
|
| 757 |
+
('num_items', c_ulong),
|
| 758 |
+
('num_expands', c_ulong),
|
| 759 |
+
('num_expand_reallocs', c_ulong),
|
| 760 |
+
('num_contracts', c_ulong),
|
| 761 |
+
('num_contract_reallocs', c_ulong),
|
| 762 |
+
('num_hash_calls', c_ulong),
|
| 763 |
+
('num_comp_calls', c_ulong),
|
| 764 |
+
('num_insert', c_ulong),
|
| 765 |
+
('num_replace', c_ulong),
|
| 766 |
+
('num_delete', c_ulong),
|
| 767 |
+
('num_no_delete', c_ulong),
|
| 768 |
+
('num_retrieve', c_ulong),
|
| 769 |
+
('num_retrieve_miss', c_ulong),
|
| 770 |
+
('num_hash_comps', c_ulong),
|
| 771 |
+
('error', c_int),
|
| 772 |
+
]
|
| 773 |
+
assert sizeof(lhash_st) == 96, sizeof(lhash_st)
|
| 774 |
+
assert alignment(lhash_st) == 4, alignment(lhash_st)
|
| 775 |
+
LHASH = lhash_st
|
| 776 |
+
class MD2state_st(Structure):
|
| 777 |
+
pass
|
| 778 |
+
MD2state_st._fields_ = [
|
| 779 |
+
('num', c_int),
|
| 780 |
+
('data', c_ubyte * 16),
|
| 781 |
+
('cksm', c_uint * 16),
|
| 782 |
+
('state', c_uint * 16),
|
| 783 |
+
]
|
| 784 |
+
assert sizeof(MD2state_st) == 148, sizeof(MD2state_st)
|
| 785 |
+
assert alignment(MD2state_st) == 4, alignment(MD2state_st)
|
| 786 |
+
MD2_CTX = MD2state_st
|
| 787 |
+
class MD4state_st(Structure):
|
| 788 |
+
pass
|
| 789 |
+
MD4state_st._fields_ = [
|
| 790 |
+
('A', c_uint),
|
| 791 |
+
('B', c_uint),
|
| 792 |
+
('C', c_uint),
|
| 793 |
+
('D', c_uint),
|
| 794 |
+
('Nl', c_uint),
|
| 795 |
+
('Nh', c_uint),
|
| 796 |
+
('data', c_uint * 16),
|
| 797 |
+
('num', c_int),
|
| 798 |
+
]
|
| 799 |
+
assert sizeof(MD4state_st) == 92, sizeof(MD4state_st)
|
| 800 |
+
assert alignment(MD4state_st) == 4, alignment(MD4state_st)
|
| 801 |
+
MD4_CTX = MD4state_st
|
| 802 |
+
class MD5state_st(Structure):
|
| 803 |
+
pass
|
| 804 |
+
MD5state_st._fields_ = [
|
| 805 |
+
('A', c_uint),
|
| 806 |
+
('B', c_uint),
|
| 807 |
+
('C', c_uint),
|
| 808 |
+
('D', c_uint),
|
| 809 |
+
('Nl', c_uint),
|
| 810 |
+
('Nh', c_uint),
|
| 811 |
+
('data', c_uint * 16),
|
| 812 |
+
('num', c_int),
|
| 813 |
+
]
|
| 814 |
+
assert sizeof(MD5state_st) == 92, sizeof(MD5state_st)
|
| 815 |
+
assert alignment(MD5state_st) == 4, alignment(MD5state_st)
|
| 816 |
+
MD5_CTX = MD5state_st
|
| 817 |
+
class mdc2_ctx_st(Structure):
|
| 818 |
+
pass
|
| 819 |
+
mdc2_ctx_st._fields_ = [
|
| 820 |
+
('num', c_int),
|
| 821 |
+
('data', c_ubyte * 8),
|
| 822 |
+
('h', DES_cblock),
|
| 823 |
+
('hh', DES_cblock),
|
| 824 |
+
('pad_type', c_int),
|
| 825 |
+
]
|
| 826 |
+
assert sizeof(mdc2_ctx_st) == 32, sizeof(mdc2_ctx_st)
|
| 827 |
+
assert alignment(mdc2_ctx_st) == 4, alignment(mdc2_ctx_st)
|
| 828 |
+
MDC2_CTX = mdc2_ctx_st
|
| 829 |
+
class obj_name_st(Structure):
|
| 830 |
+
pass
|
| 831 |
+
obj_name_st._fields_ = [
|
| 832 |
+
('type', c_int),
|
| 833 |
+
('alias', c_int),
|
| 834 |
+
('name', STRING),
|
| 835 |
+
('data', STRING),
|
| 836 |
+
]
|
| 837 |
+
assert sizeof(obj_name_st) == 16, sizeof(obj_name_st)
|
| 838 |
+
assert alignment(obj_name_st) == 4, alignment(obj_name_st)
|
| 839 |
+
OBJ_NAME = obj_name_st
|
| 840 |
+
ASN1_TIME = asn1_string_st
|
| 841 |
+
ASN1_NULL = c_int
|
| 842 |
+
EVP_PKEY = evp_pkey_st
|
| 843 |
+
class x509_st(Structure):
|
| 844 |
+
pass
|
| 845 |
+
X509 = x509_st
|
| 846 |
+
class X509_algor_st(Structure):
|
| 847 |
+
pass
|
| 848 |
+
X509_ALGOR = X509_algor_st
|
| 849 |
+
class X509_crl_st(Structure):
|
| 850 |
+
pass
|
| 851 |
+
X509_CRL = X509_crl_st
|
| 852 |
+
class X509_name_st(Structure):
|
| 853 |
+
pass
|
| 854 |
+
X509_NAME = X509_name_st
|
| 855 |
+
class x509_store_st(Structure):
|
| 856 |
+
pass
|
| 857 |
+
X509_STORE = x509_store_st
|
| 858 |
+
class x509_store_ctx_st(Structure):
|
| 859 |
+
pass
|
| 860 |
+
X509_STORE_CTX = x509_store_ctx_st
|
| 861 |
+
engine_st._fields_ = [
|
| 862 |
+
]
|
| 863 |
+
class PEM_Encode_Seal_st(Structure):
|
| 864 |
+
pass
|
| 865 |
+
PEM_Encode_Seal_st._fields_ = [
|
| 866 |
+
('encode', EVP_ENCODE_CTX),
|
| 867 |
+
('md', EVP_MD_CTX),
|
| 868 |
+
('cipher', EVP_CIPHER_CTX),
|
| 869 |
+
]
|
| 870 |
+
assert sizeof(PEM_Encode_Seal_st) == 252, sizeof(PEM_Encode_Seal_st)
|
| 871 |
+
assert alignment(PEM_Encode_Seal_st) == 4, alignment(PEM_Encode_Seal_st)
|
| 872 |
+
PEM_ENCODE_SEAL_CTX = PEM_Encode_Seal_st
|
| 873 |
+
class pem_recip_st(Structure):
|
| 874 |
+
pass
|
| 875 |
+
pem_recip_st._fields_ = [
|
| 876 |
+
('name', STRING),
|
| 877 |
+
('dn', POINTER(X509_NAME)),
|
| 878 |
+
('cipher', c_int),
|
| 879 |
+
('key_enc', c_int),
|
| 880 |
+
]
|
| 881 |
+
assert sizeof(pem_recip_st) == 16, sizeof(pem_recip_st)
|
| 882 |
+
assert alignment(pem_recip_st) == 4, alignment(pem_recip_st)
|
| 883 |
+
PEM_USER = pem_recip_st
|
| 884 |
+
class pem_ctx_st(Structure):
|
| 885 |
+
pass
|
| 886 |
+
class N10pem_ctx_st4DOLLAR_16E(Structure):
|
| 887 |
+
pass
|
| 888 |
+
N10pem_ctx_st4DOLLAR_16E._fields_ = [
|
| 889 |
+
('version', c_int),
|
| 890 |
+
('mode', c_int),
|
| 891 |
+
]
|
| 892 |
+
assert sizeof(N10pem_ctx_st4DOLLAR_16E) == 8, sizeof(N10pem_ctx_st4DOLLAR_16E)
|
| 893 |
+
assert alignment(N10pem_ctx_st4DOLLAR_16E) == 4, alignment(N10pem_ctx_st4DOLLAR_16E)
|
| 894 |
+
class N10pem_ctx_st4DOLLAR_17E(Structure):
|
| 895 |
+
pass
|
| 896 |
+
N10pem_ctx_st4DOLLAR_17E._fields_ = [
|
| 897 |
+
('cipher', c_int),
|
| 898 |
+
]
|
| 899 |
+
assert sizeof(N10pem_ctx_st4DOLLAR_17E) == 4, sizeof(N10pem_ctx_st4DOLLAR_17E)
|
| 900 |
+
assert alignment(N10pem_ctx_st4DOLLAR_17E) == 4, alignment(N10pem_ctx_st4DOLLAR_17E)
|
| 901 |
+
pem_ctx_st._fields_ = [
|
| 902 |
+
('type', c_int),
|
| 903 |
+
('proc_type', N10pem_ctx_st4DOLLAR_16E),
|
| 904 |
+
('domain', STRING),
|
| 905 |
+
('DEK_info', N10pem_ctx_st4DOLLAR_17E),
|
| 906 |
+
('originator', POINTER(PEM_USER)),
|
| 907 |
+
('num_recipient', c_int),
|
| 908 |
+
('recipient', POINTER(POINTER(PEM_USER))),
|
| 909 |
+
('x509_chain', POINTER(STACK)),
|
| 910 |
+
('md', POINTER(EVP_MD)),
|
| 911 |
+
('md_enc', c_int),
|
| 912 |
+
('md_len', c_int),
|
| 913 |
+
('md_data', STRING),
|
| 914 |
+
('dec', POINTER(EVP_CIPHER)),
|
| 915 |
+
('key_len', c_int),
|
| 916 |
+
('key', POINTER(c_ubyte)),
|
| 917 |
+
('data_enc', c_int),
|
| 918 |
+
('data_len', c_int),
|
| 919 |
+
('data', POINTER(c_ubyte)),
|
| 920 |
+
]
|
| 921 |
+
assert sizeof(pem_ctx_st) == 76, sizeof(pem_ctx_st)
|
| 922 |
+
assert alignment(pem_ctx_st) == 4, alignment(pem_ctx_st)
|
| 923 |
+
PEM_CTX = pem_ctx_st
|
| 924 |
+
pem_password_cb = CFUNCTYPE(c_int, STRING, c_int, c_int, c_void_p)
|
| 925 |
+
class pkcs7_issuer_and_serial_st(Structure):
|
| 926 |
+
pass
|
| 927 |
+
pkcs7_issuer_and_serial_st._fields_ = [
|
| 928 |
+
('issuer', POINTER(X509_NAME)),
|
| 929 |
+
('serial', POINTER(ASN1_INTEGER)),
|
| 930 |
+
]
|
| 931 |
+
assert sizeof(pkcs7_issuer_and_serial_st) == 8, sizeof(pkcs7_issuer_and_serial_st)
|
| 932 |
+
assert alignment(pkcs7_issuer_and_serial_st) == 4, alignment(pkcs7_issuer_and_serial_st)
|
| 933 |
+
PKCS7_ISSUER_AND_SERIAL = pkcs7_issuer_and_serial_st
|
| 934 |
+
class pkcs7_signer_info_st(Structure):
|
| 935 |
+
pass
|
| 936 |
+
pkcs7_signer_info_st._fields_ = [
|
| 937 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 938 |
+
('issuer_and_serial', POINTER(PKCS7_ISSUER_AND_SERIAL)),
|
| 939 |
+
('digest_alg', POINTER(X509_ALGOR)),
|
| 940 |
+
('auth_attr', POINTER(STACK)),
|
| 941 |
+
('digest_enc_alg', POINTER(X509_ALGOR)),
|
| 942 |
+
('enc_digest', POINTER(ASN1_OCTET_STRING)),
|
| 943 |
+
('unauth_attr', POINTER(STACK)),
|
| 944 |
+
('pkey', POINTER(EVP_PKEY)),
|
| 945 |
+
]
|
| 946 |
+
assert sizeof(pkcs7_signer_info_st) == 32, sizeof(pkcs7_signer_info_st)
|
| 947 |
+
assert alignment(pkcs7_signer_info_st) == 4, alignment(pkcs7_signer_info_st)
|
| 948 |
+
PKCS7_SIGNER_INFO = pkcs7_signer_info_st
|
| 949 |
+
class pkcs7_recip_info_st(Structure):
|
| 950 |
+
pass
|
| 951 |
+
pkcs7_recip_info_st._fields_ = [
|
| 952 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 953 |
+
('issuer_and_serial', POINTER(PKCS7_ISSUER_AND_SERIAL)),
|
| 954 |
+
('key_enc_algor', POINTER(X509_ALGOR)),
|
| 955 |
+
('enc_key', POINTER(ASN1_OCTET_STRING)),
|
| 956 |
+
('cert', POINTER(X509)),
|
| 957 |
+
]
|
| 958 |
+
assert sizeof(pkcs7_recip_info_st) == 20, sizeof(pkcs7_recip_info_st)
|
| 959 |
+
assert alignment(pkcs7_recip_info_st) == 4, alignment(pkcs7_recip_info_st)
|
| 960 |
+
PKCS7_RECIP_INFO = pkcs7_recip_info_st
|
| 961 |
+
class pkcs7_signed_st(Structure):
|
| 962 |
+
pass
|
| 963 |
+
class pkcs7_st(Structure):
|
| 964 |
+
pass
|
| 965 |
+
pkcs7_signed_st._fields_ = [
|
| 966 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 967 |
+
('md_algs', POINTER(STACK)),
|
| 968 |
+
('cert', POINTER(STACK)),
|
| 969 |
+
('crl', POINTER(STACK)),
|
| 970 |
+
('signer_info', POINTER(STACK)),
|
| 971 |
+
('contents', POINTER(pkcs7_st)),
|
| 972 |
+
]
|
| 973 |
+
assert sizeof(pkcs7_signed_st) == 24, sizeof(pkcs7_signed_st)
|
| 974 |
+
assert alignment(pkcs7_signed_st) == 4, alignment(pkcs7_signed_st)
|
| 975 |
+
PKCS7_SIGNED = pkcs7_signed_st
|
| 976 |
+
class pkcs7_enc_content_st(Structure):
|
| 977 |
+
pass
|
| 978 |
+
pkcs7_enc_content_st._fields_ = [
|
| 979 |
+
('content_type', POINTER(ASN1_OBJECT)),
|
| 980 |
+
('algorithm', POINTER(X509_ALGOR)),
|
| 981 |
+
('enc_data', POINTER(ASN1_OCTET_STRING)),
|
| 982 |
+
('cipher', POINTER(EVP_CIPHER)),
|
| 983 |
+
]
|
| 984 |
+
assert sizeof(pkcs7_enc_content_st) == 16, sizeof(pkcs7_enc_content_st)
|
| 985 |
+
assert alignment(pkcs7_enc_content_st) == 4, alignment(pkcs7_enc_content_st)
|
| 986 |
+
PKCS7_ENC_CONTENT = pkcs7_enc_content_st
|
| 987 |
+
class pkcs7_enveloped_st(Structure):
|
| 988 |
+
pass
|
| 989 |
+
pkcs7_enveloped_st._fields_ = [
|
| 990 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 991 |
+
('recipientinfo', POINTER(STACK)),
|
| 992 |
+
('enc_data', POINTER(PKCS7_ENC_CONTENT)),
|
| 993 |
+
]
|
| 994 |
+
assert sizeof(pkcs7_enveloped_st) == 12, sizeof(pkcs7_enveloped_st)
|
| 995 |
+
assert alignment(pkcs7_enveloped_st) == 4, alignment(pkcs7_enveloped_st)
|
| 996 |
+
PKCS7_ENVELOPE = pkcs7_enveloped_st
|
| 997 |
+
class pkcs7_signedandenveloped_st(Structure):
|
| 998 |
+
pass
|
| 999 |
+
pkcs7_signedandenveloped_st._fields_ = [
|
| 1000 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 1001 |
+
('md_algs', POINTER(STACK)),
|
| 1002 |
+
('cert', POINTER(STACK)),
|
| 1003 |
+
('crl', POINTER(STACK)),
|
| 1004 |
+
('signer_info', POINTER(STACK)),
|
| 1005 |
+
('enc_data', POINTER(PKCS7_ENC_CONTENT)),
|
| 1006 |
+
('recipientinfo', POINTER(STACK)),
|
| 1007 |
+
]
|
| 1008 |
+
assert sizeof(pkcs7_signedandenveloped_st) == 28, sizeof(pkcs7_signedandenveloped_st)
|
| 1009 |
+
assert alignment(pkcs7_signedandenveloped_st) == 4, alignment(pkcs7_signedandenveloped_st)
|
| 1010 |
+
PKCS7_SIGN_ENVELOPE = pkcs7_signedandenveloped_st
|
| 1011 |
+
class pkcs7_digest_st(Structure):
|
| 1012 |
+
pass
|
| 1013 |
+
pkcs7_digest_st._fields_ = [
|
| 1014 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 1015 |
+
('md', POINTER(X509_ALGOR)),
|
| 1016 |
+
('contents', POINTER(pkcs7_st)),
|
| 1017 |
+
('digest', POINTER(ASN1_OCTET_STRING)),
|
| 1018 |
+
]
|
| 1019 |
+
assert sizeof(pkcs7_digest_st) == 16, sizeof(pkcs7_digest_st)
|
| 1020 |
+
assert alignment(pkcs7_digest_st) == 4, alignment(pkcs7_digest_st)
|
| 1021 |
+
PKCS7_DIGEST = pkcs7_digest_st
|
| 1022 |
+
class pkcs7_encrypted_st(Structure):
|
| 1023 |
+
pass
|
| 1024 |
+
pkcs7_encrypted_st._fields_ = [
|
| 1025 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 1026 |
+
('enc_data', POINTER(PKCS7_ENC_CONTENT)),
|
| 1027 |
+
]
|
| 1028 |
+
assert sizeof(pkcs7_encrypted_st) == 8, sizeof(pkcs7_encrypted_st)
|
| 1029 |
+
assert alignment(pkcs7_encrypted_st) == 4, alignment(pkcs7_encrypted_st)
|
| 1030 |
+
PKCS7_ENCRYPT = pkcs7_encrypted_st
|
| 1031 |
+
class N8pkcs7_st4DOLLAR_15E(Union):
|
| 1032 |
+
pass
|
| 1033 |
+
N8pkcs7_st4DOLLAR_15E._fields_ = [
|
| 1034 |
+
('ptr', STRING),
|
| 1035 |
+
('data', POINTER(ASN1_OCTET_STRING)),
|
| 1036 |
+
('sign', POINTER(PKCS7_SIGNED)),
|
| 1037 |
+
('enveloped', POINTER(PKCS7_ENVELOPE)),
|
| 1038 |
+
('signed_and_enveloped', POINTER(PKCS7_SIGN_ENVELOPE)),
|
| 1039 |
+
('digest', POINTER(PKCS7_DIGEST)),
|
| 1040 |
+
('encrypted', POINTER(PKCS7_ENCRYPT)),
|
| 1041 |
+
('other', POINTER(ASN1_TYPE)),
|
| 1042 |
+
]
|
| 1043 |
+
assert sizeof(N8pkcs7_st4DOLLAR_15E) == 4, sizeof(N8pkcs7_st4DOLLAR_15E)
|
| 1044 |
+
assert alignment(N8pkcs7_st4DOLLAR_15E) == 4, alignment(N8pkcs7_st4DOLLAR_15E)
|
| 1045 |
+
pkcs7_st._fields_ = [
|
| 1046 |
+
('asn1', POINTER(c_ubyte)),
|
| 1047 |
+
('length', c_long),
|
| 1048 |
+
('state', c_int),
|
| 1049 |
+
('detached', c_int),
|
| 1050 |
+
('type', POINTER(ASN1_OBJECT)),
|
| 1051 |
+
('d', N8pkcs7_st4DOLLAR_15E),
|
| 1052 |
+
]
|
| 1053 |
+
assert sizeof(pkcs7_st) == 24, sizeof(pkcs7_st)
|
| 1054 |
+
assert alignment(pkcs7_st) == 4, alignment(pkcs7_st)
|
| 1055 |
+
PKCS7 = pkcs7_st
|
| 1056 |
+
class rc2_key_st(Structure):
|
| 1057 |
+
pass
|
| 1058 |
+
rc2_key_st._fields_ = [
|
| 1059 |
+
('data', c_uint * 64),
|
| 1060 |
+
]
|
| 1061 |
+
assert sizeof(rc2_key_st) == 256, sizeof(rc2_key_st)
|
| 1062 |
+
assert alignment(rc2_key_st) == 4, alignment(rc2_key_st)
|
| 1063 |
+
RC2_KEY = rc2_key_st
|
| 1064 |
+
class rc4_key_st(Structure):
|
| 1065 |
+
pass
|
| 1066 |
+
rc4_key_st._fields_ = [
|
| 1067 |
+
('x', c_ubyte),
|
| 1068 |
+
('y', c_ubyte),
|
| 1069 |
+
('data', c_ubyte * 256),
|
| 1070 |
+
]
|
| 1071 |
+
assert sizeof(rc4_key_st) == 258, sizeof(rc4_key_st)
|
| 1072 |
+
assert alignment(rc4_key_st) == 1, alignment(rc4_key_st)
|
| 1073 |
+
RC4_KEY = rc4_key_st
|
| 1074 |
+
class rc5_key_st(Structure):
|
| 1075 |
+
pass
|
| 1076 |
+
rc5_key_st._fields_ = [
|
| 1077 |
+
('rounds', c_int),
|
| 1078 |
+
('data', c_ulong * 34),
|
| 1079 |
+
]
|
| 1080 |
+
assert sizeof(rc5_key_st) == 140, sizeof(rc5_key_st)
|
| 1081 |
+
assert alignment(rc5_key_st) == 4, alignment(rc5_key_st)
|
| 1082 |
+
RC5_32_KEY = rc5_key_st
|
| 1083 |
+
class RIPEMD160state_st(Structure):
|
| 1084 |
+
pass
|
| 1085 |
+
RIPEMD160state_st._fields_ = [
|
| 1086 |
+
('A', c_uint),
|
| 1087 |
+
('B', c_uint),
|
| 1088 |
+
('C', c_uint),
|
| 1089 |
+
('D', c_uint),
|
| 1090 |
+
('E', c_uint),
|
| 1091 |
+
('Nl', c_uint),
|
| 1092 |
+
('Nh', c_uint),
|
| 1093 |
+
('data', c_uint * 16),
|
| 1094 |
+
('num', c_int),
|
| 1095 |
+
]
|
| 1096 |
+
assert sizeof(RIPEMD160state_st) == 96, sizeof(RIPEMD160state_st)
|
| 1097 |
+
assert alignment(RIPEMD160state_st) == 4, alignment(RIPEMD160state_st)
|
| 1098 |
+
RIPEMD160_CTX = RIPEMD160state_st
|
| 1099 |
+
RSA = rsa_st
|
| 1100 |
+
class rsa_meth_st(Structure):
|
| 1101 |
+
pass
|
| 1102 |
+
rsa_meth_st._fields_ = [
|
| 1103 |
+
('name', STRING),
|
| 1104 |
+
('rsa_pub_enc', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
|
| 1105 |
+
('rsa_pub_dec', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
|
| 1106 |
+
('rsa_priv_enc', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
|
| 1107 |
+
('rsa_priv_dec', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), POINTER(c_ubyte), POINTER(RSA), c_int)),
|
| 1108 |
+
('rsa_mod_exp', CFUNCTYPE(c_int, POINTER(BIGNUM), POINTER(BIGNUM), POINTER(RSA))),
|
| 1109 |
+
('bn_mod_exp', CFUNCTYPE(c_int, POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BIGNUM), POINTER(BN_CTX), POINTER(BN_MONT_CTX))),
|
| 1110 |
+
('init', CFUNCTYPE(c_int, POINTER(RSA))),
|
| 1111 |
+
('finish', CFUNCTYPE(c_int, POINTER(RSA))),
|
| 1112 |
+
('flags', c_int),
|
| 1113 |
+
('app_data', STRING),
|
| 1114 |
+
('rsa_sign', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), c_uint, POINTER(c_ubyte), POINTER(c_uint), POINTER(RSA))),
|
| 1115 |
+
('rsa_verify', CFUNCTYPE(c_int, c_int, POINTER(c_ubyte), c_uint, POINTER(c_ubyte), c_uint, POINTER(RSA))),
|
| 1116 |
+
]
|
| 1117 |
+
assert sizeof(rsa_meth_st) == 52, sizeof(rsa_meth_st)
|
| 1118 |
+
assert alignment(rsa_meth_st) == 4, alignment(rsa_meth_st)
|
| 1119 |
+
RSA_METHOD = rsa_meth_st
|
| 1120 |
+
rsa_st._fields_ = [
|
| 1121 |
+
('pad', c_int),
|
| 1122 |
+
('version', c_long),
|
| 1123 |
+
('meth', POINTER(RSA_METHOD)),
|
| 1124 |
+
('engine', POINTER(ENGINE)),
|
| 1125 |
+
('n', POINTER(BIGNUM)),
|
| 1126 |
+
('e', POINTER(BIGNUM)),
|
| 1127 |
+
('d', POINTER(BIGNUM)),
|
| 1128 |
+
('p', POINTER(BIGNUM)),
|
| 1129 |
+
('q', POINTER(BIGNUM)),
|
| 1130 |
+
('dmp1', POINTER(BIGNUM)),
|
| 1131 |
+
('dmq1', POINTER(BIGNUM)),
|
| 1132 |
+
('iqmp', POINTER(BIGNUM)),
|
| 1133 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 1134 |
+
('references', c_int),
|
| 1135 |
+
('flags', c_int),
|
| 1136 |
+
('_method_mod_n', POINTER(BN_MONT_CTX)),
|
| 1137 |
+
('_method_mod_p', POINTER(BN_MONT_CTX)),
|
| 1138 |
+
('_method_mod_q', POINTER(BN_MONT_CTX)),
|
| 1139 |
+
('bignum_data', STRING),
|
| 1140 |
+
('blinding', POINTER(BN_BLINDING)),
|
| 1141 |
+
]
|
| 1142 |
+
assert sizeof(rsa_st) == 84, sizeof(rsa_st)
|
| 1143 |
+
assert alignment(rsa_st) == 4, alignment(rsa_st)
|
| 1144 |
+
openssl_fptr = CFUNCTYPE(None)
|
| 1145 |
+
class SHAstate_st(Structure):
|
| 1146 |
+
pass
|
| 1147 |
+
SHAstate_st._fields_ = [
|
| 1148 |
+
('h0', c_uint),
|
| 1149 |
+
('h1', c_uint),
|
| 1150 |
+
('h2', c_uint),
|
| 1151 |
+
('h3', c_uint),
|
| 1152 |
+
('h4', c_uint),
|
| 1153 |
+
('Nl', c_uint),
|
| 1154 |
+
('Nh', c_uint),
|
| 1155 |
+
('data', c_uint * 16),
|
| 1156 |
+
('num', c_int),
|
| 1157 |
+
]
|
| 1158 |
+
assert sizeof(SHAstate_st) == 96, sizeof(SHAstate_st)
|
| 1159 |
+
assert alignment(SHAstate_st) == 4, alignment(SHAstate_st)
|
| 1160 |
+
SHA_CTX = SHAstate_st
|
| 1161 |
+
class ssl_st(Structure):
|
| 1162 |
+
pass
|
| 1163 |
+
ssl_crock_st = POINTER(ssl_st)
|
| 1164 |
+
class ssl_cipher_st(Structure):
|
| 1165 |
+
pass
|
| 1166 |
+
ssl_cipher_st._fields_ = [
|
| 1167 |
+
('valid', c_int),
|
| 1168 |
+
('name', STRING),
|
| 1169 |
+
('id', c_ulong),
|
| 1170 |
+
('algorithms', c_ulong),
|
| 1171 |
+
('algo_strength', c_ulong),
|
| 1172 |
+
('algorithm2', c_ulong),
|
| 1173 |
+
('strength_bits', c_int),
|
| 1174 |
+
('alg_bits', c_int),
|
| 1175 |
+
('mask', c_ulong),
|
| 1176 |
+
('mask_strength', c_ulong),
|
| 1177 |
+
]
|
| 1178 |
+
assert sizeof(ssl_cipher_st) == 40, sizeof(ssl_cipher_st)
|
| 1179 |
+
assert alignment(ssl_cipher_st) == 4, alignment(ssl_cipher_st)
|
| 1180 |
+
SSL_CIPHER = ssl_cipher_st
|
| 1181 |
+
SSL = ssl_st
|
| 1182 |
+
class ssl_ctx_st(Structure):
|
| 1183 |
+
pass
|
| 1184 |
+
SSL_CTX = ssl_ctx_st
|
| 1185 |
+
class ssl_method_st(Structure):
|
| 1186 |
+
pass
|
| 1187 |
+
class ssl3_enc_method(Structure):
|
| 1188 |
+
pass
|
| 1189 |
+
ssl_method_st._fields_ = [
|
| 1190 |
+
('version', c_int),
|
| 1191 |
+
('ssl_new', CFUNCTYPE(c_int, POINTER(SSL))),
|
| 1192 |
+
('ssl_clear', CFUNCTYPE(None, POINTER(SSL))),
|
| 1193 |
+
('ssl_free', CFUNCTYPE(None, POINTER(SSL))),
|
| 1194 |
+
('ssl_accept', CFUNCTYPE(c_int, POINTER(SSL))),
|
| 1195 |
+
('ssl_connect', CFUNCTYPE(c_int, POINTER(SSL))),
|
| 1196 |
+
('ssl_read', CFUNCTYPE(c_int, POINTER(SSL), c_void_p, c_int)),
|
| 1197 |
+
('ssl_peek', CFUNCTYPE(c_int, POINTER(SSL), c_void_p, c_int)),
|
| 1198 |
+
('ssl_write', CFUNCTYPE(c_int, POINTER(SSL), c_void_p, c_int)),
|
| 1199 |
+
('ssl_shutdown', CFUNCTYPE(c_int, POINTER(SSL))),
|
| 1200 |
+
('ssl_renegotiate', CFUNCTYPE(c_int, POINTER(SSL))),
|
| 1201 |
+
('ssl_renegotiate_check', CFUNCTYPE(c_int, POINTER(SSL))),
|
| 1202 |
+
('ssl_ctrl', CFUNCTYPE(c_long, POINTER(SSL), c_int, c_long, c_void_p)),
|
| 1203 |
+
('ssl_ctx_ctrl', CFUNCTYPE(c_long, POINTER(SSL_CTX), c_int, c_long, c_void_p)),
|
| 1204 |
+
('get_cipher_by_char', CFUNCTYPE(POINTER(SSL_CIPHER), POINTER(c_ubyte))),
|
| 1205 |
+
('put_cipher_by_char', CFUNCTYPE(c_int, POINTER(SSL_CIPHER), POINTER(c_ubyte))),
|
| 1206 |
+
('ssl_pending', CFUNCTYPE(c_int, POINTER(SSL))),
|
| 1207 |
+
('num_ciphers', CFUNCTYPE(c_int)),
|
| 1208 |
+
('get_cipher', CFUNCTYPE(POINTER(SSL_CIPHER), c_uint)),
|
| 1209 |
+
('get_ssl_method', CFUNCTYPE(POINTER(ssl_method_st), c_int)),
|
| 1210 |
+
('get_timeout', CFUNCTYPE(c_long)),
|
| 1211 |
+
('ssl3_enc', POINTER(ssl3_enc_method)),
|
| 1212 |
+
('ssl_version', CFUNCTYPE(c_int)),
|
| 1213 |
+
('ssl_callback_ctrl', CFUNCTYPE(c_long, POINTER(SSL), c_int, CFUNCTYPE(None))),
|
| 1214 |
+
('ssl_ctx_callback_ctrl', CFUNCTYPE(c_long, POINTER(SSL_CTX), c_int, CFUNCTYPE(None))),
|
| 1215 |
+
]
|
| 1216 |
+
assert sizeof(ssl_method_st) == 100, sizeof(ssl_method_st)
|
| 1217 |
+
assert alignment(ssl_method_st) == 4, alignment(ssl_method_st)
|
| 1218 |
+
ssl3_enc_method._fields_ = [
|
| 1219 |
+
]
|
| 1220 |
+
SSL_METHOD = ssl_method_st
|
| 1221 |
+
class ssl_session_st(Structure):
|
| 1222 |
+
pass
|
| 1223 |
+
class sess_cert_st(Structure):
|
| 1224 |
+
pass
|
| 1225 |
+
ssl_session_st._fields_ = [
|
| 1226 |
+
('ssl_version', c_int),
|
| 1227 |
+
('key_arg_length', c_uint),
|
| 1228 |
+
('key_arg', c_ubyte * 8),
|
| 1229 |
+
('master_key_length', c_int),
|
| 1230 |
+
('master_key', c_ubyte * 48),
|
| 1231 |
+
('session_id_length', c_uint),
|
| 1232 |
+
('session_id', c_ubyte * 32),
|
| 1233 |
+
('sid_ctx_length', c_uint),
|
| 1234 |
+
('sid_ctx', c_ubyte * 32),
|
| 1235 |
+
('not_resumable', c_int),
|
| 1236 |
+
('sess_cert', POINTER(sess_cert_st)),
|
| 1237 |
+
('peer', POINTER(X509)),
|
| 1238 |
+
('verify_result', c_long),
|
| 1239 |
+
('references', c_int),
|
| 1240 |
+
('timeout', c_long),
|
| 1241 |
+
('time', c_long),
|
| 1242 |
+
('compress_meth', c_int),
|
| 1243 |
+
('cipher', POINTER(SSL_CIPHER)),
|
| 1244 |
+
('cipher_id', c_ulong),
|
| 1245 |
+
('ciphers', POINTER(STACK)),
|
| 1246 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 1247 |
+
('prev', POINTER(ssl_session_st)),
|
| 1248 |
+
('next', POINTER(ssl_session_st)),
|
| 1249 |
+
]
|
| 1250 |
+
assert sizeof(ssl_session_st) == 200, sizeof(ssl_session_st)
|
| 1251 |
+
assert alignment(ssl_session_st) == 4, alignment(ssl_session_st)
|
| 1252 |
+
sess_cert_st._fields_ = [
|
| 1253 |
+
]
|
| 1254 |
+
SSL_SESSION = ssl_session_st
|
| 1255 |
+
GEN_SESSION_CB = CFUNCTYPE(c_int, POINTER(SSL), POINTER(c_ubyte), POINTER(c_uint))
|
| 1256 |
+
class ssl_comp_st(Structure):
|
| 1257 |
+
pass
|
| 1258 |
+
ssl_comp_st._fields_ = [
|
| 1259 |
+
('id', c_int),
|
| 1260 |
+
('name', STRING),
|
| 1261 |
+
('method', POINTER(COMP_METHOD)),
|
| 1262 |
+
]
|
| 1263 |
+
assert sizeof(ssl_comp_st) == 12, sizeof(ssl_comp_st)
|
| 1264 |
+
assert alignment(ssl_comp_st) == 4, alignment(ssl_comp_st)
|
| 1265 |
+
SSL_COMP = ssl_comp_st
|
| 1266 |
+
class N10ssl_ctx_st4DOLLAR_18E(Structure):
|
| 1267 |
+
pass
|
| 1268 |
+
N10ssl_ctx_st4DOLLAR_18E._fields_ = [
|
| 1269 |
+
('sess_connect', c_int),
|
| 1270 |
+
('sess_connect_renegotiate', c_int),
|
| 1271 |
+
('sess_connect_good', c_int),
|
| 1272 |
+
('sess_accept', c_int),
|
| 1273 |
+
('sess_accept_renegotiate', c_int),
|
| 1274 |
+
('sess_accept_good', c_int),
|
| 1275 |
+
('sess_miss', c_int),
|
| 1276 |
+
('sess_timeout', c_int),
|
| 1277 |
+
('sess_cache_full', c_int),
|
| 1278 |
+
('sess_hit', c_int),
|
| 1279 |
+
('sess_cb_hit', c_int),
|
| 1280 |
+
]
|
| 1281 |
+
assert sizeof(N10ssl_ctx_st4DOLLAR_18E) == 44, sizeof(N10ssl_ctx_st4DOLLAR_18E)
|
| 1282 |
+
assert alignment(N10ssl_ctx_st4DOLLAR_18E) == 4, alignment(N10ssl_ctx_st4DOLLAR_18E)
|
| 1283 |
+
class cert_st(Structure):
|
| 1284 |
+
pass
|
| 1285 |
+
ssl_ctx_st._fields_ = [
|
| 1286 |
+
('method', POINTER(SSL_METHOD)),
|
| 1287 |
+
('cipher_list', POINTER(STACK)),
|
| 1288 |
+
('cipher_list_by_id', POINTER(STACK)),
|
| 1289 |
+
('cert_store', POINTER(x509_store_st)),
|
| 1290 |
+
('sessions', POINTER(lhash_st)),
|
| 1291 |
+
('session_cache_size', c_ulong),
|
| 1292 |
+
('session_cache_head', POINTER(ssl_session_st)),
|
| 1293 |
+
('session_cache_tail', POINTER(ssl_session_st)),
|
| 1294 |
+
('session_cache_mode', c_int),
|
| 1295 |
+
('session_timeout', c_long),
|
| 1296 |
+
('new_session_cb', CFUNCTYPE(c_int, POINTER(ssl_st), POINTER(SSL_SESSION))),
|
| 1297 |
+
('remove_session_cb', CFUNCTYPE(None, POINTER(ssl_ctx_st), POINTER(SSL_SESSION))),
|
| 1298 |
+
('get_session_cb', CFUNCTYPE(POINTER(SSL_SESSION), POINTER(ssl_st), POINTER(c_ubyte), c_int, POINTER(c_int))),
|
| 1299 |
+
('stats', N10ssl_ctx_st4DOLLAR_18E),
|
| 1300 |
+
('references', c_int),
|
| 1301 |
+
('app_verify_callback', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), c_void_p)),
|
| 1302 |
+
('app_verify_arg', c_void_p),
|
| 1303 |
+
('default_passwd_callback', POINTER(pem_password_cb)),
|
| 1304 |
+
('default_passwd_callback_userdata', c_void_p),
|
| 1305 |
+
('client_cert_cb', CFUNCTYPE(c_int, POINTER(SSL), POINTER(POINTER(X509)), POINTER(POINTER(EVP_PKEY)))),
|
| 1306 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 1307 |
+
('rsa_md5', POINTER(EVP_MD)),
|
| 1308 |
+
('md5', POINTER(EVP_MD)),
|
| 1309 |
+
('sha1', POINTER(EVP_MD)),
|
| 1310 |
+
('extra_certs', POINTER(STACK)),
|
| 1311 |
+
('comp_methods', POINTER(STACK)),
|
| 1312 |
+
('info_callback', CFUNCTYPE(None, POINTER(SSL), c_int, c_int)),
|
| 1313 |
+
('client_CA', POINTER(STACK)),
|
| 1314 |
+
('options', c_ulong),
|
| 1315 |
+
('mode', c_ulong),
|
| 1316 |
+
('max_cert_list', c_long),
|
| 1317 |
+
('cert', POINTER(cert_st)),
|
| 1318 |
+
('read_ahead', c_int),
|
| 1319 |
+
('msg_callback', CFUNCTYPE(None, c_int, c_int, c_int, c_void_p, c_ulong, POINTER(SSL), c_void_p)),
|
| 1320 |
+
('msg_callback_arg', c_void_p),
|
| 1321 |
+
('verify_mode', c_int),
|
| 1322 |
+
('verify_depth', c_int),
|
| 1323 |
+
('sid_ctx_length', c_uint),
|
| 1324 |
+
('sid_ctx', c_ubyte * 32),
|
| 1325 |
+
('default_verify_callback', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
|
| 1326 |
+
('generate_session_id', GEN_SESSION_CB),
|
| 1327 |
+
('purpose', c_int),
|
| 1328 |
+
('trust', c_int),
|
| 1329 |
+
('quiet_shutdown', c_int),
|
| 1330 |
+
]
|
| 1331 |
+
assert sizeof(ssl_ctx_st) == 248, sizeof(ssl_ctx_st)
|
| 1332 |
+
assert alignment(ssl_ctx_st) == 4, alignment(ssl_ctx_st)
|
| 1333 |
+
cert_st._fields_ = [
|
| 1334 |
+
]
|
| 1335 |
+
class ssl2_state_st(Structure):
|
| 1336 |
+
pass
|
| 1337 |
+
class ssl3_state_st(Structure):
|
| 1338 |
+
pass
|
| 1339 |
+
ssl_st._fields_ = [
|
| 1340 |
+
('version', c_int),
|
| 1341 |
+
('type', c_int),
|
| 1342 |
+
('method', POINTER(SSL_METHOD)),
|
| 1343 |
+
('rbio', POINTER(BIO)),
|
| 1344 |
+
('wbio', POINTER(BIO)),
|
| 1345 |
+
('bbio', POINTER(BIO)),
|
| 1346 |
+
('rwstate', c_int),
|
| 1347 |
+
('in_handshake', c_int),
|
| 1348 |
+
('handshake_func', CFUNCTYPE(c_int)),
|
| 1349 |
+
('server', c_int),
|
| 1350 |
+
('new_session', c_int),
|
| 1351 |
+
('quiet_shutdown', c_int),
|
| 1352 |
+
('shutdown', c_int),
|
| 1353 |
+
('state', c_int),
|
| 1354 |
+
('rstate', c_int),
|
| 1355 |
+
('init_buf', POINTER(BUF_MEM)),
|
| 1356 |
+
('init_msg', c_void_p),
|
| 1357 |
+
('init_num', c_int),
|
| 1358 |
+
('init_off', c_int),
|
| 1359 |
+
('packet', POINTER(c_ubyte)),
|
| 1360 |
+
('packet_length', c_uint),
|
| 1361 |
+
('s2', POINTER(ssl2_state_st)),
|
| 1362 |
+
('s3', POINTER(ssl3_state_st)),
|
| 1363 |
+
('read_ahead', c_int),
|
| 1364 |
+
('msg_callback', CFUNCTYPE(None, c_int, c_int, c_int, c_void_p, c_ulong, POINTER(SSL), c_void_p)),
|
| 1365 |
+
('msg_callback_arg', c_void_p),
|
| 1366 |
+
('hit', c_int),
|
| 1367 |
+
('purpose', c_int),
|
| 1368 |
+
('trust', c_int),
|
| 1369 |
+
('cipher_list', POINTER(STACK)),
|
| 1370 |
+
('cipher_list_by_id', POINTER(STACK)),
|
| 1371 |
+
('enc_read_ctx', POINTER(EVP_CIPHER_CTX)),
|
| 1372 |
+
('read_hash', POINTER(EVP_MD)),
|
| 1373 |
+
('expand', POINTER(COMP_CTX)),
|
| 1374 |
+
('enc_write_ctx', POINTER(EVP_CIPHER_CTX)),
|
| 1375 |
+
('write_hash', POINTER(EVP_MD)),
|
| 1376 |
+
('compress', POINTER(COMP_CTX)),
|
| 1377 |
+
('cert', POINTER(cert_st)),
|
| 1378 |
+
('sid_ctx_length', c_uint),
|
| 1379 |
+
('sid_ctx', c_ubyte * 32),
|
| 1380 |
+
('session', POINTER(SSL_SESSION)),
|
| 1381 |
+
('generate_session_id', GEN_SESSION_CB),
|
| 1382 |
+
('verify_mode', c_int),
|
| 1383 |
+
('verify_depth', c_int),
|
| 1384 |
+
('verify_callback', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
|
| 1385 |
+
('info_callback', CFUNCTYPE(None, POINTER(SSL), c_int, c_int)),
|
| 1386 |
+
('error', c_int),
|
| 1387 |
+
('error_code', c_int),
|
| 1388 |
+
('ctx', POINTER(SSL_CTX)),
|
| 1389 |
+
('debug', c_int),
|
| 1390 |
+
('verify_result', c_long),
|
| 1391 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 1392 |
+
('client_CA', POINTER(STACK)),
|
| 1393 |
+
('references', c_int),
|
| 1394 |
+
('options', c_ulong),
|
| 1395 |
+
('mode', c_ulong),
|
| 1396 |
+
('max_cert_list', c_long),
|
| 1397 |
+
('first_packet', c_int),
|
| 1398 |
+
('client_version', c_int),
|
| 1399 |
+
]
|
| 1400 |
+
assert sizeof(ssl_st) == 268, sizeof(ssl_st)
|
| 1401 |
+
assert alignment(ssl_st) == 4, alignment(ssl_st)
|
| 1402 |
+
class N13ssl2_state_st4DOLLAR_19E(Structure):
|
| 1403 |
+
pass
|
| 1404 |
+
N13ssl2_state_st4DOLLAR_19E._fields_ = [
|
| 1405 |
+
('conn_id_length', c_uint),
|
| 1406 |
+
('cert_type', c_uint),
|
| 1407 |
+
('cert_length', c_uint),
|
| 1408 |
+
('csl', c_uint),
|
| 1409 |
+
('clear', c_uint),
|
| 1410 |
+
('enc', c_uint),
|
| 1411 |
+
('ccl', c_ubyte * 32),
|
| 1412 |
+
('cipher_spec_length', c_uint),
|
| 1413 |
+
('session_id_length', c_uint),
|
| 1414 |
+
('clen', c_uint),
|
| 1415 |
+
('rlen', c_uint),
|
| 1416 |
+
]
|
| 1417 |
+
assert sizeof(N13ssl2_state_st4DOLLAR_19E) == 72, sizeof(N13ssl2_state_st4DOLLAR_19E)
|
| 1418 |
+
assert alignment(N13ssl2_state_st4DOLLAR_19E) == 4, alignment(N13ssl2_state_st4DOLLAR_19E)
|
| 1419 |
+
ssl2_state_st._fields_ = [
|
| 1420 |
+
('three_byte_header', c_int),
|
| 1421 |
+
('clear_text', c_int),
|
| 1422 |
+
('escape', c_int),
|
| 1423 |
+
('ssl2_rollback', c_int),
|
| 1424 |
+
('wnum', c_uint),
|
| 1425 |
+
('wpend_tot', c_int),
|
| 1426 |
+
('wpend_buf', POINTER(c_ubyte)),
|
| 1427 |
+
('wpend_off', c_int),
|
| 1428 |
+
('wpend_len', c_int),
|
| 1429 |
+
('wpend_ret', c_int),
|
| 1430 |
+
('rbuf_left', c_int),
|
| 1431 |
+
('rbuf_offs', c_int),
|
| 1432 |
+
('rbuf', POINTER(c_ubyte)),
|
| 1433 |
+
('wbuf', POINTER(c_ubyte)),
|
| 1434 |
+
('write_ptr', POINTER(c_ubyte)),
|
| 1435 |
+
('padding', c_uint),
|
| 1436 |
+
('rlength', c_uint),
|
| 1437 |
+
('ract_data_length', c_int),
|
| 1438 |
+
('wlength', c_uint),
|
| 1439 |
+
('wact_data_length', c_int),
|
| 1440 |
+
('ract_data', POINTER(c_ubyte)),
|
| 1441 |
+
('wact_data', POINTER(c_ubyte)),
|
| 1442 |
+
('mac_data', POINTER(c_ubyte)),
|
| 1443 |
+
('read_key', POINTER(c_ubyte)),
|
| 1444 |
+
('write_key', POINTER(c_ubyte)),
|
| 1445 |
+
('challenge_length', c_uint),
|
| 1446 |
+
('challenge', c_ubyte * 32),
|
| 1447 |
+
('conn_id_length', c_uint),
|
| 1448 |
+
('conn_id', c_ubyte * 16),
|
| 1449 |
+
('key_material_length', c_uint),
|
| 1450 |
+
('key_material', c_ubyte * 48),
|
| 1451 |
+
('read_sequence', c_ulong),
|
| 1452 |
+
('write_sequence', c_ulong),
|
| 1453 |
+
('tmp', N13ssl2_state_st4DOLLAR_19E),
|
| 1454 |
+
]
|
| 1455 |
+
assert sizeof(ssl2_state_st) == 288, sizeof(ssl2_state_st)
|
| 1456 |
+
assert alignment(ssl2_state_st) == 4, alignment(ssl2_state_st)
|
| 1457 |
+
SSL2_STATE = ssl2_state_st
|
| 1458 |
+
class ssl3_record_st(Structure):
|
| 1459 |
+
pass
|
| 1460 |
+
ssl3_record_st._fields_ = [
|
| 1461 |
+
('type', c_int),
|
| 1462 |
+
('length', c_uint),
|
| 1463 |
+
('off', c_uint),
|
| 1464 |
+
('data', POINTER(c_ubyte)),
|
| 1465 |
+
('input', POINTER(c_ubyte)),
|
| 1466 |
+
('comp', POINTER(c_ubyte)),
|
| 1467 |
+
]
|
| 1468 |
+
assert sizeof(ssl3_record_st) == 24, sizeof(ssl3_record_st)
|
| 1469 |
+
assert alignment(ssl3_record_st) == 4, alignment(ssl3_record_st)
|
| 1470 |
+
SSL3_RECORD = ssl3_record_st
|
| 1471 |
+
class ssl3_buffer_st(Structure):
|
| 1472 |
+
pass
|
| 1473 |
+
size_t = __darwin_size_t
|
| 1474 |
+
ssl3_buffer_st._fields_ = [
|
| 1475 |
+
('buf', POINTER(c_ubyte)),
|
| 1476 |
+
('len', size_t),
|
| 1477 |
+
('offset', c_int),
|
| 1478 |
+
('left', c_int),
|
| 1479 |
+
]
|
| 1480 |
+
assert sizeof(ssl3_buffer_st) == 16, sizeof(ssl3_buffer_st)
|
| 1481 |
+
assert alignment(ssl3_buffer_st) == 4, alignment(ssl3_buffer_st)
|
| 1482 |
+
SSL3_BUFFER = ssl3_buffer_st
|
| 1483 |
+
class N13ssl3_state_st4DOLLAR_20E(Structure):
|
| 1484 |
+
pass
|
| 1485 |
+
N13ssl3_state_st4DOLLAR_20E._fields_ = [
|
| 1486 |
+
('cert_verify_md', c_ubyte * 72),
|
| 1487 |
+
('finish_md', c_ubyte * 72),
|
| 1488 |
+
('finish_md_len', c_int),
|
| 1489 |
+
('peer_finish_md', c_ubyte * 72),
|
| 1490 |
+
('peer_finish_md_len', c_int),
|
| 1491 |
+
('message_size', c_ulong),
|
| 1492 |
+
('message_type', c_int),
|
| 1493 |
+
('new_cipher', POINTER(SSL_CIPHER)),
|
| 1494 |
+
('dh', POINTER(DH)),
|
| 1495 |
+
('next_state', c_int),
|
| 1496 |
+
('reuse_message', c_int),
|
| 1497 |
+
('cert_req', c_int),
|
| 1498 |
+
('ctype_num', c_int),
|
| 1499 |
+
('ctype', c_char * 7),
|
| 1500 |
+
('ca_names', POINTER(STACK)),
|
| 1501 |
+
('use_rsa_tmp', c_int),
|
| 1502 |
+
('key_block_length', c_int),
|
| 1503 |
+
('key_block', POINTER(c_ubyte)),
|
| 1504 |
+
('new_sym_enc', POINTER(EVP_CIPHER)),
|
| 1505 |
+
('new_hash', POINTER(EVP_MD)),
|
| 1506 |
+
('new_compression', POINTER(SSL_COMP)),
|
| 1507 |
+
('cert_request', c_int),
|
| 1508 |
+
]
|
| 1509 |
+
assert sizeof(N13ssl3_state_st4DOLLAR_20E) == 296, sizeof(N13ssl3_state_st4DOLLAR_20E)
|
| 1510 |
+
assert alignment(N13ssl3_state_st4DOLLAR_20E) == 4, alignment(N13ssl3_state_st4DOLLAR_20E)
|
| 1511 |
+
ssl3_state_st._fields_ = [
|
| 1512 |
+
('flags', c_long),
|
| 1513 |
+
('delay_buf_pop_ret', c_int),
|
| 1514 |
+
('read_sequence', c_ubyte * 8),
|
| 1515 |
+
('read_mac_secret', c_ubyte * 36),
|
| 1516 |
+
('write_sequence', c_ubyte * 8),
|
| 1517 |
+
('write_mac_secret', c_ubyte * 36),
|
| 1518 |
+
('server_random', c_ubyte * 32),
|
| 1519 |
+
('client_random', c_ubyte * 32),
|
| 1520 |
+
('need_empty_fragments', c_int),
|
| 1521 |
+
('empty_fragment_done', c_int),
|
| 1522 |
+
('rbuf', SSL3_BUFFER),
|
| 1523 |
+
('wbuf', SSL3_BUFFER),
|
| 1524 |
+
('rrec', SSL3_RECORD),
|
| 1525 |
+
('wrec', SSL3_RECORD),
|
| 1526 |
+
('alert_fragment', c_ubyte * 2),
|
| 1527 |
+
('alert_fragment_len', c_uint),
|
| 1528 |
+
('handshake_fragment', c_ubyte * 4),
|
| 1529 |
+
('handshake_fragment_len', c_uint),
|
| 1530 |
+
('wnum', c_uint),
|
| 1531 |
+
('wpend_tot', c_int),
|
| 1532 |
+
('wpend_type', c_int),
|
| 1533 |
+
('wpend_ret', c_int),
|
| 1534 |
+
('wpend_buf', POINTER(c_ubyte)),
|
| 1535 |
+
('finish_dgst1', EVP_MD_CTX),
|
| 1536 |
+
('finish_dgst2', EVP_MD_CTX),
|
| 1537 |
+
('change_cipher_spec', c_int),
|
| 1538 |
+
('warn_alert', c_int),
|
| 1539 |
+
('fatal_alert', c_int),
|
| 1540 |
+
('alert_dispatch', c_int),
|
| 1541 |
+
('send_alert', c_ubyte * 2),
|
| 1542 |
+
('renegotiate', c_int),
|
| 1543 |
+
('total_renegotiations', c_int),
|
| 1544 |
+
('num_renegotiations', c_int),
|
| 1545 |
+
('in_read_app_data', c_int),
|
| 1546 |
+
('tmp', N13ssl3_state_st4DOLLAR_20E),
|
| 1547 |
+
]
|
| 1548 |
+
assert sizeof(ssl3_state_st) == 648, sizeof(ssl3_state_st)
|
| 1549 |
+
assert alignment(ssl3_state_st) == 4, alignment(ssl3_state_st)
|
| 1550 |
+
SSL3_STATE = ssl3_state_st
|
| 1551 |
+
stack_st._fields_ = [
|
| 1552 |
+
('num', c_int),
|
| 1553 |
+
('data', POINTER(STRING)),
|
| 1554 |
+
('sorted', c_int),
|
| 1555 |
+
('num_alloc', c_int),
|
| 1556 |
+
('comp', CFUNCTYPE(c_int, POINTER(STRING), POINTER(STRING))),
|
| 1557 |
+
]
|
| 1558 |
+
assert sizeof(stack_st) == 20, sizeof(stack_st)
|
| 1559 |
+
assert alignment(stack_st) == 4, alignment(stack_st)
|
| 1560 |
+
class ui_st(Structure):
|
| 1561 |
+
pass
|
| 1562 |
+
ui_st._fields_ = [
|
| 1563 |
+
]
|
| 1564 |
+
UI = ui_st
|
| 1565 |
+
class ui_method_st(Structure):
|
| 1566 |
+
pass
|
| 1567 |
+
ui_method_st._fields_ = [
|
| 1568 |
+
]
|
| 1569 |
+
UI_METHOD = ui_method_st
|
| 1570 |
+
class ui_string_st(Structure):
|
| 1571 |
+
pass
|
| 1572 |
+
ui_string_st._fields_ = [
|
| 1573 |
+
]
|
| 1574 |
+
UI_STRING = ui_string_st
|
| 1575 |
+
|
| 1576 |
+
# values for enumeration 'UI_string_types'
|
| 1577 |
+
UI_string_types = c_int # enum
|
| 1578 |
+
class X509_objects_st(Structure):
|
| 1579 |
+
pass
|
| 1580 |
+
X509_objects_st._fields_ = [
|
| 1581 |
+
('nid', c_int),
|
| 1582 |
+
('a2i', CFUNCTYPE(c_int)),
|
| 1583 |
+
('i2a', CFUNCTYPE(c_int)),
|
| 1584 |
+
]
|
| 1585 |
+
assert sizeof(X509_objects_st) == 12, sizeof(X509_objects_st)
|
| 1586 |
+
assert alignment(X509_objects_st) == 4, alignment(X509_objects_st)
|
| 1587 |
+
X509_OBJECTS = X509_objects_st
|
| 1588 |
+
X509_algor_st._fields_ = [
|
| 1589 |
+
('algorithm', POINTER(ASN1_OBJECT)),
|
| 1590 |
+
('parameter', POINTER(ASN1_TYPE)),
|
| 1591 |
+
]
|
| 1592 |
+
assert sizeof(X509_algor_st) == 8, sizeof(X509_algor_st)
|
| 1593 |
+
assert alignment(X509_algor_st) == 4, alignment(X509_algor_st)
|
| 1594 |
+
class X509_val_st(Structure):
|
| 1595 |
+
pass
|
| 1596 |
+
X509_val_st._fields_ = [
|
| 1597 |
+
('notBefore', POINTER(ASN1_TIME)),
|
| 1598 |
+
('notAfter', POINTER(ASN1_TIME)),
|
| 1599 |
+
]
|
| 1600 |
+
assert sizeof(X509_val_st) == 8, sizeof(X509_val_st)
|
| 1601 |
+
assert alignment(X509_val_st) == 4, alignment(X509_val_st)
|
| 1602 |
+
X509_VAL = X509_val_st
|
| 1603 |
+
class X509_pubkey_st(Structure):
|
| 1604 |
+
pass
|
| 1605 |
+
X509_pubkey_st._fields_ = [
|
| 1606 |
+
('algor', POINTER(X509_ALGOR)),
|
| 1607 |
+
('public_key', POINTER(ASN1_BIT_STRING)),
|
| 1608 |
+
('pkey', POINTER(EVP_PKEY)),
|
| 1609 |
+
]
|
| 1610 |
+
assert sizeof(X509_pubkey_st) == 12, sizeof(X509_pubkey_st)
|
| 1611 |
+
assert alignment(X509_pubkey_st) == 4, alignment(X509_pubkey_st)
|
| 1612 |
+
X509_PUBKEY = X509_pubkey_st
|
| 1613 |
+
class X509_sig_st(Structure):
|
| 1614 |
+
pass
|
| 1615 |
+
X509_sig_st._fields_ = [
|
| 1616 |
+
('algor', POINTER(X509_ALGOR)),
|
| 1617 |
+
('digest', POINTER(ASN1_OCTET_STRING)),
|
| 1618 |
+
]
|
| 1619 |
+
assert sizeof(X509_sig_st) == 8, sizeof(X509_sig_st)
|
| 1620 |
+
assert alignment(X509_sig_st) == 4, alignment(X509_sig_st)
|
| 1621 |
+
X509_SIG = X509_sig_st
|
| 1622 |
+
class X509_name_entry_st(Structure):
|
| 1623 |
+
pass
|
| 1624 |
+
X509_name_entry_st._fields_ = [
|
| 1625 |
+
('object', POINTER(ASN1_OBJECT)),
|
| 1626 |
+
('value', POINTER(ASN1_STRING)),
|
| 1627 |
+
('set', c_int),
|
| 1628 |
+
('size', c_int),
|
| 1629 |
+
]
|
| 1630 |
+
assert sizeof(X509_name_entry_st) == 16, sizeof(X509_name_entry_st)
|
| 1631 |
+
assert alignment(X509_name_entry_st) == 4, alignment(X509_name_entry_st)
|
| 1632 |
+
X509_NAME_ENTRY = X509_name_entry_st
|
| 1633 |
+
X509_name_st._fields_ = [
|
| 1634 |
+
('entries', POINTER(STACK)),
|
| 1635 |
+
('modified', c_int),
|
| 1636 |
+
('bytes', POINTER(BUF_MEM)),
|
| 1637 |
+
('hash', c_ulong),
|
| 1638 |
+
]
|
| 1639 |
+
assert sizeof(X509_name_st) == 16, sizeof(X509_name_st)
|
| 1640 |
+
assert alignment(X509_name_st) == 4, alignment(X509_name_st)
|
| 1641 |
+
class X509_extension_st(Structure):
|
| 1642 |
+
pass
|
| 1643 |
+
X509_extension_st._fields_ = [
|
| 1644 |
+
('object', POINTER(ASN1_OBJECT)),
|
| 1645 |
+
('critical', ASN1_BOOLEAN),
|
| 1646 |
+
('value', POINTER(ASN1_OCTET_STRING)),
|
| 1647 |
+
]
|
| 1648 |
+
assert sizeof(X509_extension_st) == 12, sizeof(X509_extension_st)
|
| 1649 |
+
assert alignment(X509_extension_st) == 4, alignment(X509_extension_st)
|
| 1650 |
+
X509_EXTENSION = X509_extension_st
|
| 1651 |
+
class x509_attributes_st(Structure):
|
| 1652 |
+
pass
|
| 1653 |
+
class N18x509_attributes_st4DOLLAR_13E(Union):
|
| 1654 |
+
pass
|
| 1655 |
+
N18x509_attributes_st4DOLLAR_13E._fields_ = [
|
| 1656 |
+
('ptr', STRING),
|
| 1657 |
+
('set', POINTER(STACK)),
|
| 1658 |
+
('single', POINTER(ASN1_TYPE)),
|
| 1659 |
+
]
|
| 1660 |
+
assert sizeof(N18x509_attributes_st4DOLLAR_13E) == 4, sizeof(N18x509_attributes_st4DOLLAR_13E)
|
| 1661 |
+
assert alignment(N18x509_attributes_st4DOLLAR_13E) == 4, alignment(N18x509_attributes_st4DOLLAR_13E)
|
| 1662 |
+
x509_attributes_st._fields_ = [
|
| 1663 |
+
('object', POINTER(ASN1_OBJECT)),
|
| 1664 |
+
('single', c_int),
|
| 1665 |
+
('value', N18x509_attributes_st4DOLLAR_13E),
|
| 1666 |
+
]
|
| 1667 |
+
assert sizeof(x509_attributes_st) == 12, sizeof(x509_attributes_st)
|
| 1668 |
+
assert alignment(x509_attributes_st) == 4, alignment(x509_attributes_st)
|
| 1669 |
+
X509_ATTRIBUTE = x509_attributes_st
|
| 1670 |
+
class X509_req_info_st(Structure):
|
| 1671 |
+
pass
|
| 1672 |
+
X509_req_info_st._fields_ = [
|
| 1673 |
+
('enc', ASN1_ENCODING),
|
| 1674 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 1675 |
+
('subject', POINTER(X509_NAME)),
|
| 1676 |
+
('pubkey', POINTER(X509_PUBKEY)),
|
| 1677 |
+
('attributes', POINTER(STACK)),
|
| 1678 |
+
]
|
| 1679 |
+
assert sizeof(X509_req_info_st) == 28, sizeof(X509_req_info_st)
|
| 1680 |
+
assert alignment(X509_req_info_st) == 4, alignment(X509_req_info_st)
|
| 1681 |
+
X509_REQ_INFO = X509_req_info_st
|
| 1682 |
+
class X509_req_st(Structure):
|
| 1683 |
+
pass
|
| 1684 |
+
X509_req_st._fields_ = [
|
| 1685 |
+
('req_info', POINTER(X509_REQ_INFO)),
|
| 1686 |
+
('sig_alg', POINTER(X509_ALGOR)),
|
| 1687 |
+
('signature', POINTER(ASN1_BIT_STRING)),
|
| 1688 |
+
('references', c_int),
|
| 1689 |
+
]
|
| 1690 |
+
assert sizeof(X509_req_st) == 16, sizeof(X509_req_st)
|
| 1691 |
+
assert alignment(X509_req_st) == 4, alignment(X509_req_st)
|
| 1692 |
+
X509_REQ = X509_req_st
|
| 1693 |
+
class x509_cinf_st(Structure):
|
| 1694 |
+
pass
|
| 1695 |
+
x509_cinf_st._fields_ = [
|
| 1696 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 1697 |
+
('serialNumber', POINTER(ASN1_INTEGER)),
|
| 1698 |
+
('signature', POINTER(X509_ALGOR)),
|
| 1699 |
+
('issuer', POINTER(X509_NAME)),
|
| 1700 |
+
('validity', POINTER(X509_VAL)),
|
| 1701 |
+
('subject', POINTER(X509_NAME)),
|
| 1702 |
+
('key', POINTER(X509_PUBKEY)),
|
| 1703 |
+
('issuerUID', POINTER(ASN1_BIT_STRING)),
|
| 1704 |
+
('subjectUID', POINTER(ASN1_BIT_STRING)),
|
| 1705 |
+
('extensions', POINTER(STACK)),
|
| 1706 |
+
]
|
| 1707 |
+
assert sizeof(x509_cinf_st) == 40, sizeof(x509_cinf_st)
|
| 1708 |
+
assert alignment(x509_cinf_st) == 4, alignment(x509_cinf_st)
|
| 1709 |
+
X509_CINF = x509_cinf_st
|
| 1710 |
+
class x509_cert_aux_st(Structure):
|
| 1711 |
+
pass
|
| 1712 |
+
x509_cert_aux_st._fields_ = [
|
| 1713 |
+
('trust', POINTER(STACK)),
|
| 1714 |
+
('reject', POINTER(STACK)),
|
| 1715 |
+
('alias', POINTER(ASN1_UTF8STRING)),
|
| 1716 |
+
('keyid', POINTER(ASN1_OCTET_STRING)),
|
| 1717 |
+
('other', POINTER(STACK)),
|
| 1718 |
+
]
|
| 1719 |
+
assert sizeof(x509_cert_aux_st) == 20, sizeof(x509_cert_aux_st)
|
| 1720 |
+
assert alignment(x509_cert_aux_st) == 4, alignment(x509_cert_aux_st)
|
| 1721 |
+
X509_CERT_AUX = x509_cert_aux_st
|
| 1722 |
+
class AUTHORITY_KEYID_st(Structure):
|
| 1723 |
+
pass
|
| 1724 |
+
x509_st._fields_ = [
|
| 1725 |
+
('cert_info', POINTER(X509_CINF)),
|
| 1726 |
+
('sig_alg', POINTER(X509_ALGOR)),
|
| 1727 |
+
('signature', POINTER(ASN1_BIT_STRING)),
|
| 1728 |
+
('valid', c_int),
|
| 1729 |
+
('references', c_int),
|
| 1730 |
+
('name', STRING),
|
| 1731 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 1732 |
+
('ex_pathlen', c_long),
|
| 1733 |
+
('ex_flags', c_ulong),
|
| 1734 |
+
('ex_kusage', c_ulong),
|
| 1735 |
+
('ex_xkusage', c_ulong),
|
| 1736 |
+
('ex_nscert', c_ulong),
|
| 1737 |
+
('skid', POINTER(ASN1_OCTET_STRING)),
|
| 1738 |
+
('akid', POINTER(AUTHORITY_KEYID_st)),
|
| 1739 |
+
('sha1_hash', c_ubyte * 20),
|
| 1740 |
+
('aux', POINTER(X509_CERT_AUX)),
|
| 1741 |
+
]
|
| 1742 |
+
assert sizeof(x509_st) == 84, sizeof(x509_st)
|
| 1743 |
+
assert alignment(x509_st) == 4, alignment(x509_st)
|
| 1744 |
+
AUTHORITY_KEYID_st._fields_ = [
|
| 1745 |
+
]
|
| 1746 |
+
class x509_trust_st(Structure):
|
| 1747 |
+
pass
|
| 1748 |
+
x509_trust_st._fields_ = [
|
| 1749 |
+
('trust', c_int),
|
| 1750 |
+
('flags', c_int),
|
| 1751 |
+
('check_trust', CFUNCTYPE(c_int, POINTER(x509_trust_st), POINTER(X509), c_int)),
|
| 1752 |
+
('name', STRING),
|
| 1753 |
+
('arg1', c_int),
|
| 1754 |
+
('arg2', c_void_p),
|
| 1755 |
+
]
|
| 1756 |
+
assert sizeof(x509_trust_st) == 24, sizeof(x509_trust_st)
|
| 1757 |
+
assert alignment(x509_trust_st) == 4, alignment(x509_trust_st)
|
| 1758 |
+
X509_TRUST = x509_trust_st
|
| 1759 |
+
class X509_revoked_st(Structure):
|
| 1760 |
+
pass
|
| 1761 |
+
X509_revoked_st._fields_ = [
|
| 1762 |
+
('serialNumber', POINTER(ASN1_INTEGER)),
|
| 1763 |
+
('revocationDate', POINTER(ASN1_TIME)),
|
| 1764 |
+
('extensions', POINTER(STACK)),
|
| 1765 |
+
('sequence', c_int),
|
| 1766 |
+
]
|
| 1767 |
+
assert sizeof(X509_revoked_st) == 16, sizeof(X509_revoked_st)
|
| 1768 |
+
assert alignment(X509_revoked_st) == 4, alignment(X509_revoked_st)
|
| 1769 |
+
X509_REVOKED = X509_revoked_st
|
| 1770 |
+
class X509_crl_info_st(Structure):
|
| 1771 |
+
pass
|
| 1772 |
+
X509_crl_info_st._fields_ = [
|
| 1773 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 1774 |
+
('sig_alg', POINTER(X509_ALGOR)),
|
| 1775 |
+
('issuer', POINTER(X509_NAME)),
|
| 1776 |
+
('lastUpdate', POINTER(ASN1_TIME)),
|
| 1777 |
+
('nextUpdate', POINTER(ASN1_TIME)),
|
| 1778 |
+
('revoked', POINTER(STACK)),
|
| 1779 |
+
('extensions', POINTER(STACK)),
|
| 1780 |
+
('enc', ASN1_ENCODING),
|
| 1781 |
+
]
|
| 1782 |
+
assert sizeof(X509_crl_info_st) == 40, sizeof(X509_crl_info_st)
|
| 1783 |
+
assert alignment(X509_crl_info_st) == 4, alignment(X509_crl_info_st)
|
| 1784 |
+
X509_CRL_INFO = X509_crl_info_st
|
| 1785 |
+
X509_crl_st._fields_ = [
|
| 1786 |
+
('crl', POINTER(X509_CRL_INFO)),
|
| 1787 |
+
('sig_alg', POINTER(X509_ALGOR)),
|
| 1788 |
+
('signature', POINTER(ASN1_BIT_STRING)),
|
| 1789 |
+
('references', c_int),
|
| 1790 |
+
]
|
| 1791 |
+
assert sizeof(X509_crl_st) == 16, sizeof(X509_crl_st)
|
| 1792 |
+
assert alignment(X509_crl_st) == 4, alignment(X509_crl_st)
|
| 1793 |
+
class private_key_st(Structure):
|
| 1794 |
+
pass
|
| 1795 |
+
private_key_st._fields_ = [
|
| 1796 |
+
('version', c_int),
|
| 1797 |
+
('enc_algor', POINTER(X509_ALGOR)),
|
| 1798 |
+
('enc_pkey', POINTER(ASN1_OCTET_STRING)),
|
| 1799 |
+
('dec_pkey', POINTER(EVP_PKEY)),
|
| 1800 |
+
('key_length', c_int),
|
| 1801 |
+
('key_data', STRING),
|
| 1802 |
+
('key_free', c_int),
|
| 1803 |
+
('cipher', EVP_CIPHER_INFO),
|
| 1804 |
+
('references', c_int),
|
| 1805 |
+
]
|
| 1806 |
+
assert sizeof(private_key_st) == 52, sizeof(private_key_st)
|
| 1807 |
+
assert alignment(private_key_st) == 4, alignment(private_key_st)
|
| 1808 |
+
X509_PKEY = private_key_st
|
| 1809 |
+
class X509_info_st(Structure):
|
| 1810 |
+
pass
|
| 1811 |
+
X509_info_st._fields_ = [
|
| 1812 |
+
('x509', POINTER(X509)),
|
| 1813 |
+
('crl', POINTER(X509_CRL)),
|
| 1814 |
+
('x_pkey', POINTER(X509_PKEY)),
|
| 1815 |
+
('enc_cipher', EVP_CIPHER_INFO),
|
| 1816 |
+
('enc_len', c_int),
|
| 1817 |
+
('enc_data', STRING),
|
| 1818 |
+
('references', c_int),
|
| 1819 |
+
]
|
| 1820 |
+
assert sizeof(X509_info_st) == 44, sizeof(X509_info_st)
|
| 1821 |
+
assert alignment(X509_info_st) == 4, alignment(X509_info_st)
|
| 1822 |
+
X509_INFO = X509_info_st
|
| 1823 |
+
class Netscape_spkac_st(Structure):
|
| 1824 |
+
pass
|
| 1825 |
+
Netscape_spkac_st._fields_ = [
|
| 1826 |
+
('pubkey', POINTER(X509_PUBKEY)),
|
| 1827 |
+
('challenge', POINTER(ASN1_IA5STRING)),
|
| 1828 |
+
]
|
| 1829 |
+
assert sizeof(Netscape_spkac_st) == 8, sizeof(Netscape_spkac_st)
|
| 1830 |
+
assert alignment(Netscape_spkac_st) == 4, alignment(Netscape_spkac_st)
|
| 1831 |
+
NETSCAPE_SPKAC = Netscape_spkac_st
|
| 1832 |
+
class Netscape_spki_st(Structure):
|
| 1833 |
+
pass
|
| 1834 |
+
Netscape_spki_st._fields_ = [
|
| 1835 |
+
('spkac', POINTER(NETSCAPE_SPKAC)),
|
| 1836 |
+
('sig_algor', POINTER(X509_ALGOR)),
|
| 1837 |
+
('signature', POINTER(ASN1_BIT_STRING)),
|
| 1838 |
+
]
|
| 1839 |
+
assert sizeof(Netscape_spki_st) == 12, sizeof(Netscape_spki_st)
|
| 1840 |
+
assert alignment(Netscape_spki_st) == 4, alignment(Netscape_spki_st)
|
| 1841 |
+
NETSCAPE_SPKI = Netscape_spki_st
|
| 1842 |
+
class Netscape_certificate_sequence(Structure):
|
| 1843 |
+
pass
|
| 1844 |
+
Netscape_certificate_sequence._fields_ = [
|
| 1845 |
+
('type', POINTER(ASN1_OBJECT)),
|
| 1846 |
+
('certs', POINTER(STACK)),
|
| 1847 |
+
]
|
| 1848 |
+
assert sizeof(Netscape_certificate_sequence) == 8, sizeof(Netscape_certificate_sequence)
|
| 1849 |
+
assert alignment(Netscape_certificate_sequence) == 4, alignment(Netscape_certificate_sequence)
|
| 1850 |
+
NETSCAPE_CERT_SEQUENCE = Netscape_certificate_sequence
|
| 1851 |
+
class PBEPARAM_st(Structure):
|
| 1852 |
+
pass
|
| 1853 |
+
PBEPARAM_st._fields_ = [
|
| 1854 |
+
('salt', POINTER(ASN1_OCTET_STRING)),
|
| 1855 |
+
('iter', POINTER(ASN1_INTEGER)),
|
| 1856 |
+
]
|
| 1857 |
+
assert sizeof(PBEPARAM_st) == 8, sizeof(PBEPARAM_st)
|
| 1858 |
+
assert alignment(PBEPARAM_st) == 4, alignment(PBEPARAM_st)
|
| 1859 |
+
PBEPARAM = PBEPARAM_st
|
| 1860 |
+
class PBE2PARAM_st(Structure):
|
| 1861 |
+
pass
|
| 1862 |
+
PBE2PARAM_st._fields_ = [
|
| 1863 |
+
('keyfunc', POINTER(X509_ALGOR)),
|
| 1864 |
+
('encryption', POINTER(X509_ALGOR)),
|
| 1865 |
+
]
|
| 1866 |
+
assert sizeof(PBE2PARAM_st) == 8, sizeof(PBE2PARAM_st)
|
| 1867 |
+
assert alignment(PBE2PARAM_st) == 4, alignment(PBE2PARAM_st)
|
| 1868 |
+
PBE2PARAM = PBE2PARAM_st
|
| 1869 |
+
class PBKDF2PARAM_st(Structure):
|
| 1870 |
+
pass
|
| 1871 |
+
PBKDF2PARAM_st._fields_ = [
|
| 1872 |
+
('salt', POINTER(ASN1_TYPE)),
|
| 1873 |
+
('iter', POINTER(ASN1_INTEGER)),
|
| 1874 |
+
('keylength', POINTER(ASN1_INTEGER)),
|
| 1875 |
+
('prf', POINTER(X509_ALGOR)),
|
| 1876 |
+
]
|
| 1877 |
+
assert sizeof(PBKDF2PARAM_st) == 16, sizeof(PBKDF2PARAM_st)
|
| 1878 |
+
assert alignment(PBKDF2PARAM_st) == 4, alignment(PBKDF2PARAM_st)
|
| 1879 |
+
PBKDF2PARAM = PBKDF2PARAM_st
|
| 1880 |
+
class pkcs8_priv_key_info_st(Structure):
|
| 1881 |
+
pass
|
| 1882 |
+
pkcs8_priv_key_info_st._fields_ = [
|
| 1883 |
+
('broken', c_int),
|
| 1884 |
+
('version', POINTER(ASN1_INTEGER)),
|
| 1885 |
+
('pkeyalg', POINTER(X509_ALGOR)),
|
| 1886 |
+
('pkey', POINTER(ASN1_TYPE)),
|
| 1887 |
+
('attributes', POINTER(STACK)),
|
| 1888 |
+
]
|
| 1889 |
+
assert sizeof(pkcs8_priv_key_info_st) == 20, sizeof(pkcs8_priv_key_info_st)
|
| 1890 |
+
assert alignment(pkcs8_priv_key_info_st) == 4, alignment(pkcs8_priv_key_info_st)
|
| 1891 |
+
PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st
|
| 1892 |
+
class x509_hash_dir_st(Structure):
|
| 1893 |
+
pass
|
| 1894 |
+
x509_hash_dir_st._fields_ = [
|
| 1895 |
+
('num_dirs', c_int),
|
| 1896 |
+
('dirs', POINTER(STRING)),
|
| 1897 |
+
('dirs_type', POINTER(c_int)),
|
| 1898 |
+
('num_dirs_alloced', c_int),
|
| 1899 |
+
]
|
| 1900 |
+
assert sizeof(x509_hash_dir_st) == 16, sizeof(x509_hash_dir_st)
|
| 1901 |
+
assert alignment(x509_hash_dir_st) == 4, alignment(x509_hash_dir_st)
|
| 1902 |
+
X509_HASH_DIR_CTX = x509_hash_dir_st
|
| 1903 |
+
class x509_file_st(Structure):
|
| 1904 |
+
pass
|
| 1905 |
+
x509_file_st._fields_ = [
|
| 1906 |
+
('num_paths', c_int),
|
| 1907 |
+
('num_alloced', c_int),
|
| 1908 |
+
('paths', POINTER(STRING)),
|
| 1909 |
+
('path_type', POINTER(c_int)),
|
| 1910 |
+
]
|
| 1911 |
+
assert sizeof(x509_file_st) == 16, sizeof(x509_file_st)
|
| 1912 |
+
assert alignment(x509_file_st) == 4, alignment(x509_file_st)
|
| 1913 |
+
X509_CERT_FILE_CTX = x509_file_st
|
| 1914 |
+
class x509_object_st(Structure):
|
| 1915 |
+
pass
|
| 1916 |
+
class N14x509_object_st4DOLLAR_14E(Union):
|
| 1917 |
+
pass
|
| 1918 |
+
N14x509_object_st4DOLLAR_14E._fields_ = [
|
| 1919 |
+
('ptr', STRING),
|
| 1920 |
+
('x509', POINTER(X509)),
|
| 1921 |
+
('crl', POINTER(X509_CRL)),
|
| 1922 |
+
('pkey', POINTER(EVP_PKEY)),
|
| 1923 |
+
]
|
| 1924 |
+
assert sizeof(N14x509_object_st4DOLLAR_14E) == 4, sizeof(N14x509_object_st4DOLLAR_14E)
|
| 1925 |
+
assert alignment(N14x509_object_st4DOLLAR_14E) == 4, alignment(N14x509_object_st4DOLLAR_14E)
|
| 1926 |
+
x509_object_st._fields_ = [
|
| 1927 |
+
('type', c_int),
|
| 1928 |
+
('data', N14x509_object_st4DOLLAR_14E),
|
| 1929 |
+
]
|
| 1930 |
+
assert sizeof(x509_object_st) == 8, sizeof(x509_object_st)
|
| 1931 |
+
assert alignment(x509_object_st) == 4, alignment(x509_object_st)
|
| 1932 |
+
X509_OBJECT = x509_object_st
|
| 1933 |
+
class x509_lookup_st(Structure):
|
| 1934 |
+
pass
|
| 1935 |
+
X509_LOOKUP = x509_lookup_st
|
| 1936 |
+
class x509_lookup_method_st(Structure):
|
| 1937 |
+
pass
|
| 1938 |
+
x509_lookup_method_st._fields_ = [
|
| 1939 |
+
('name', STRING),
|
| 1940 |
+
('new_item', CFUNCTYPE(c_int, POINTER(X509_LOOKUP))),
|
| 1941 |
+
('free', CFUNCTYPE(None, POINTER(X509_LOOKUP))),
|
| 1942 |
+
('init', CFUNCTYPE(c_int, POINTER(X509_LOOKUP))),
|
| 1943 |
+
('shutdown', CFUNCTYPE(c_int, POINTER(X509_LOOKUP))),
|
| 1944 |
+
('ctrl', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, STRING, c_long, POINTER(STRING))),
|
| 1945 |
+
('get_by_subject', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, POINTER(X509_NAME), POINTER(X509_OBJECT))),
|
| 1946 |
+
('get_by_issuer_serial', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, POINTER(X509_NAME), POINTER(ASN1_INTEGER), POINTER(X509_OBJECT))),
|
| 1947 |
+
('get_by_fingerprint', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, POINTER(c_ubyte), c_int, POINTER(X509_OBJECT))),
|
| 1948 |
+
('get_by_alias', CFUNCTYPE(c_int, POINTER(X509_LOOKUP), c_int, STRING, c_int, POINTER(X509_OBJECT))),
|
| 1949 |
+
]
|
| 1950 |
+
assert sizeof(x509_lookup_method_st) == 40, sizeof(x509_lookup_method_st)
|
| 1951 |
+
assert alignment(x509_lookup_method_st) == 4, alignment(x509_lookup_method_st)
|
| 1952 |
+
X509_LOOKUP_METHOD = x509_lookup_method_st
|
| 1953 |
+
x509_store_st._fields_ = [
|
| 1954 |
+
('cache', c_int),
|
| 1955 |
+
('objs', POINTER(STACK)),
|
| 1956 |
+
('get_cert_methods', POINTER(STACK)),
|
| 1957 |
+
('flags', c_ulong),
|
| 1958 |
+
('purpose', c_int),
|
| 1959 |
+
('trust', c_int),
|
| 1960 |
+
('verify', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
|
| 1961 |
+
('verify_cb', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
|
| 1962 |
+
('get_issuer', CFUNCTYPE(c_int, POINTER(POINTER(X509)), POINTER(X509_STORE_CTX), POINTER(X509))),
|
| 1963 |
+
('check_issued', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509), POINTER(X509))),
|
| 1964 |
+
('check_revocation', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
|
| 1965 |
+
('get_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(POINTER(X509_CRL)), POINTER(X509))),
|
| 1966 |
+
('check_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509_CRL))),
|
| 1967 |
+
('cert_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509_CRL), POINTER(X509))),
|
| 1968 |
+
('cleanup', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
|
| 1969 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 1970 |
+
('references', c_int),
|
| 1971 |
+
('depth', c_int),
|
| 1972 |
+
]
|
| 1973 |
+
assert sizeof(x509_store_st) == 76, sizeof(x509_store_st)
|
| 1974 |
+
assert alignment(x509_store_st) == 4, alignment(x509_store_st)
|
| 1975 |
+
x509_lookup_st._fields_ = [
|
| 1976 |
+
('init', c_int),
|
| 1977 |
+
('skip', c_int),
|
| 1978 |
+
('method', POINTER(X509_LOOKUP_METHOD)),
|
| 1979 |
+
('method_data', STRING),
|
| 1980 |
+
('store_ctx', POINTER(X509_STORE)),
|
| 1981 |
+
]
|
| 1982 |
+
assert sizeof(x509_lookup_st) == 20, sizeof(x509_lookup_st)
|
| 1983 |
+
assert alignment(x509_lookup_st) == 4, alignment(x509_lookup_st)
|
| 1984 |
+
time_t = __darwin_time_t
|
| 1985 |
+
x509_store_ctx_st._fields_ = [
|
| 1986 |
+
('ctx', POINTER(X509_STORE)),
|
| 1987 |
+
('current_method', c_int),
|
| 1988 |
+
('cert', POINTER(X509)),
|
| 1989 |
+
('untrusted', POINTER(STACK)),
|
| 1990 |
+
('purpose', c_int),
|
| 1991 |
+
('trust', c_int),
|
| 1992 |
+
('check_time', time_t),
|
| 1993 |
+
('flags', c_ulong),
|
| 1994 |
+
('other_ctx', c_void_p),
|
| 1995 |
+
('verify', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
|
| 1996 |
+
('verify_cb', CFUNCTYPE(c_int, c_int, POINTER(X509_STORE_CTX))),
|
| 1997 |
+
('get_issuer', CFUNCTYPE(c_int, POINTER(POINTER(X509)), POINTER(X509_STORE_CTX), POINTER(X509))),
|
| 1998 |
+
('check_issued', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509), POINTER(X509))),
|
| 1999 |
+
('check_revocation', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
|
| 2000 |
+
('get_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(POINTER(X509_CRL)), POINTER(X509))),
|
| 2001 |
+
('check_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509_CRL))),
|
| 2002 |
+
('cert_crl', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX), POINTER(X509_CRL), POINTER(X509))),
|
| 2003 |
+
('cleanup', CFUNCTYPE(c_int, POINTER(X509_STORE_CTX))),
|
| 2004 |
+
('depth', c_int),
|
| 2005 |
+
('valid', c_int),
|
| 2006 |
+
('last_untrusted', c_int),
|
| 2007 |
+
('chain', POINTER(STACK)),
|
| 2008 |
+
('error_depth', c_int),
|
| 2009 |
+
('error', c_int),
|
| 2010 |
+
('current_cert', POINTER(X509)),
|
| 2011 |
+
('current_issuer', POINTER(X509)),
|
| 2012 |
+
('current_crl', POINTER(X509_CRL)),
|
| 2013 |
+
('ex_data', CRYPTO_EX_DATA),
|
| 2014 |
+
]
|
| 2015 |
+
assert sizeof(x509_store_ctx_st) == 116, sizeof(x509_store_ctx_st)
|
| 2016 |
+
assert alignment(x509_store_ctx_st) == 4, alignment(x509_store_ctx_st)
|
| 2017 |
+
va_list = __darwin_va_list
|
| 2018 |
+
__darwin_off_t = __int64_t
|
| 2019 |
+
fpos_t = __darwin_off_t
|
| 2020 |
+
class __sbuf(Structure):
|
| 2021 |
+
pass
|
| 2022 |
+
__sbuf._fields_ = [
|
| 2023 |
+
('_base', POINTER(c_ubyte)),
|
| 2024 |
+
('_size', c_int),
|
| 2025 |
+
]
|
| 2026 |
+
assert sizeof(__sbuf) == 8, sizeof(__sbuf)
|
| 2027 |
+
assert alignment(__sbuf) == 4, alignment(__sbuf)
|
| 2028 |
+
class __sFILEX(Structure):
|
| 2029 |
+
pass
|
| 2030 |
+
__sFILEX._fields_ = [
|
| 2031 |
+
]
|
| 2032 |
+
class __sFILE(Structure):
|
| 2033 |
+
pass
|
| 2034 |
+
__sFILE._pack_ = 4
|
| 2035 |
+
__sFILE._fields_ = [
|
| 2036 |
+
('_p', POINTER(c_ubyte)),
|
| 2037 |
+
('_r', c_int),
|
| 2038 |
+
('_w', c_int),
|
| 2039 |
+
('_flags', c_short),
|
| 2040 |
+
('_file', c_short),
|
| 2041 |
+
('_bf', __sbuf),
|
| 2042 |
+
('_lbfsize', c_int),
|
| 2043 |
+
('_cookie', c_void_p),
|
| 2044 |
+
('_close', CFUNCTYPE(c_int, c_void_p)),
|
| 2045 |
+
('_read', CFUNCTYPE(c_int, c_void_p, STRING, c_int)),
|
| 2046 |
+
('_seek', CFUNCTYPE(fpos_t, c_void_p, c_longlong, c_int)),
|
| 2047 |
+
('_write', CFUNCTYPE(c_int, c_void_p, STRING, c_int)),
|
| 2048 |
+
('_ub', __sbuf),
|
| 2049 |
+
('_extra', POINTER(__sFILEX)),
|
| 2050 |
+
('_ur', c_int),
|
| 2051 |
+
('_ubuf', c_ubyte * 3),
|
| 2052 |
+
('_nbuf', c_ubyte * 1),
|
| 2053 |
+
('_lb', __sbuf),
|
| 2054 |
+
('_blksize', c_int),
|
| 2055 |
+
('_offset', fpos_t),
|
| 2056 |
+
]
|
| 2057 |
+
assert sizeof(__sFILE) == 88, sizeof(__sFILE)
|
| 2058 |
+
assert alignment(__sFILE) == 4, alignment(__sFILE)
|
| 2059 |
+
FILE = __sFILE
|
| 2060 |
+
ct_rune_t = __darwin_ct_rune_t
|
| 2061 |
+
rune_t = __darwin_rune_t
|
| 2062 |
+
class div_t(Structure):
|
| 2063 |
+
pass
|
| 2064 |
+
div_t._fields_ = [
|
| 2065 |
+
('quot', c_int),
|
| 2066 |
+
('rem', c_int),
|
| 2067 |
+
]
|
| 2068 |
+
assert sizeof(div_t) == 8, sizeof(div_t)
|
| 2069 |
+
assert alignment(div_t) == 4, alignment(div_t)
|
| 2070 |
+
class ldiv_t(Structure):
|
| 2071 |
+
pass
|
| 2072 |
+
ldiv_t._fields_ = [
|
| 2073 |
+
('quot', c_long),
|
| 2074 |
+
('rem', c_long),
|
| 2075 |
+
]
|
| 2076 |
+
assert sizeof(ldiv_t) == 8, sizeof(ldiv_t)
|
| 2077 |
+
assert alignment(ldiv_t) == 4, alignment(ldiv_t)
|
| 2078 |
+
class lldiv_t(Structure):
|
| 2079 |
+
pass
|
| 2080 |
+
lldiv_t._pack_ = 4
|
| 2081 |
+
lldiv_t._fields_ = [
|
| 2082 |
+
('quot', c_longlong),
|
| 2083 |
+
('rem', c_longlong),
|
| 2084 |
+
]
|
| 2085 |
+
assert sizeof(lldiv_t) == 16, sizeof(lldiv_t)
|
| 2086 |
+
assert alignment(lldiv_t) == 4, alignment(lldiv_t)
|
| 2087 |
+
__darwin_dev_t = __int32_t
|
| 2088 |
+
dev_t = __darwin_dev_t
|
| 2089 |
+
__darwin_mode_t = __uint16_t
|
| 2090 |
+
mode_t = __darwin_mode_t
|
| 2091 |
+
class mcontext(Structure):
|
| 2092 |
+
pass
|
| 2093 |
+
mcontext._fields_ = [
|
| 2094 |
+
]
|
| 2095 |
+
class mcontext64(Structure):
|
| 2096 |
+
pass
|
| 2097 |
+
mcontext64._fields_ = [
|
| 2098 |
+
]
|
| 2099 |
+
class __darwin_pthread_handler_rec(Structure):
|
| 2100 |
+
pass
|
| 2101 |
+
__darwin_pthread_handler_rec._fields_ = [
|
| 2102 |
+
('__routine', CFUNCTYPE(None, c_void_p)),
|
| 2103 |
+
('__arg', c_void_p),
|
| 2104 |
+
('__next', POINTER(__darwin_pthread_handler_rec)),
|
| 2105 |
+
]
|
| 2106 |
+
assert sizeof(__darwin_pthread_handler_rec) == 12, sizeof(__darwin_pthread_handler_rec)
|
| 2107 |
+
assert alignment(__darwin_pthread_handler_rec) == 4, alignment(__darwin_pthread_handler_rec)
|
| 2108 |
+
class _opaque_pthread_attr_t(Structure):
|
| 2109 |
+
pass
|
| 2110 |
+
_opaque_pthread_attr_t._fields_ = [
|
| 2111 |
+
('__sig', c_long),
|
| 2112 |
+
('__opaque', c_char * 36),
|
| 2113 |
+
]
|
| 2114 |
+
assert sizeof(_opaque_pthread_attr_t) == 40, sizeof(_opaque_pthread_attr_t)
|
| 2115 |
+
assert alignment(_opaque_pthread_attr_t) == 4, alignment(_opaque_pthread_attr_t)
|
| 2116 |
+
class _opaque_pthread_cond_t(Structure):
|
| 2117 |
+
pass
|
| 2118 |
+
_opaque_pthread_cond_t._fields_ = [
|
| 2119 |
+
('__sig', c_long),
|
| 2120 |
+
('__opaque', c_char * 24),
|
| 2121 |
+
]
|
| 2122 |
+
assert sizeof(_opaque_pthread_cond_t) == 28, sizeof(_opaque_pthread_cond_t)
|
| 2123 |
+
assert alignment(_opaque_pthread_cond_t) == 4, alignment(_opaque_pthread_cond_t)
|
| 2124 |
+
class _opaque_pthread_condattr_t(Structure):
|
| 2125 |
+
pass
|
| 2126 |
+
_opaque_pthread_condattr_t._fields_ = [
|
| 2127 |
+
('__sig', c_long),
|
| 2128 |
+
('__opaque', c_char * 4),
|
| 2129 |
+
]
|
| 2130 |
+
assert sizeof(_opaque_pthread_condattr_t) == 8, sizeof(_opaque_pthread_condattr_t)
|
| 2131 |
+
assert alignment(_opaque_pthread_condattr_t) == 4, alignment(_opaque_pthread_condattr_t)
|
| 2132 |
+
class _opaque_pthread_mutex_t(Structure):
|
| 2133 |
+
pass
|
| 2134 |
+
_opaque_pthread_mutex_t._fields_ = [
|
| 2135 |
+
('__sig', c_long),
|
| 2136 |
+
('__opaque', c_char * 40),
|
| 2137 |
+
]
|
| 2138 |
+
assert sizeof(_opaque_pthread_mutex_t) == 44, sizeof(_opaque_pthread_mutex_t)
|
| 2139 |
+
assert alignment(_opaque_pthread_mutex_t) == 4, alignment(_opaque_pthread_mutex_t)
|
| 2140 |
+
class _opaque_pthread_mutexattr_t(Structure):
|
| 2141 |
+
pass
|
| 2142 |
+
_opaque_pthread_mutexattr_t._fields_ = [
|
| 2143 |
+
('__sig', c_long),
|
| 2144 |
+
('__opaque', c_char * 8),
|
| 2145 |
+
]
|
| 2146 |
+
assert sizeof(_opaque_pthread_mutexattr_t) == 12, sizeof(_opaque_pthread_mutexattr_t)
|
| 2147 |
+
assert alignment(_opaque_pthread_mutexattr_t) == 4, alignment(_opaque_pthread_mutexattr_t)
|
| 2148 |
+
class _opaque_pthread_once_t(Structure):
|
| 2149 |
+
pass
|
| 2150 |
+
_opaque_pthread_once_t._fields_ = [
|
| 2151 |
+
('__sig', c_long),
|
| 2152 |
+
('__opaque', c_char * 4),
|
| 2153 |
+
]
|
| 2154 |
+
assert sizeof(_opaque_pthread_once_t) == 8, sizeof(_opaque_pthread_once_t)
|
| 2155 |
+
assert alignment(_opaque_pthread_once_t) == 4, alignment(_opaque_pthread_once_t)
|
| 2156 |
+
class _opaque_pthread_rwlock_t(Structure):
|
| 2157 |
+
pass
|
| 2158 |
+
_opaque_pthread_rwlock_t._fields_ = [
|
| 2159 |
+
('__sig', c_long),
|
| 2160 |
+
('__opaque', c_char * 124),
|
| 2161 |
+
]
|
| 2162 |
+
assert sizeof(_opaque_pthread_rwlock_t) == 128, sizeof(_opaque_pthread_rwlock_t)
|
| 2163 |
+
assert alignment(_opaque_pthread_rwlock_t) == 4, alignment(_opaque_pthread_rwlock_t)
|
| 2164 |
+
class _opaque_pthread_rwlockattr_t(Structure):
|
| 2165 |
+
pass
|
| 2166 |
+
_opaque_pthread_rwlockattr_t._fields_ = [
|
| 2167 |
+
('__sig', c_long),
|
| 2168 |
+
('__opaque', c_char * 12),
|
| 2169 |
+
]
|
| 2170 |
+
assert sizeof(_opaque_pthread_rwlockattr_t) == 16, sizeof(_opaque_pthread_rwlockattr_t)
|
| 2171 |
+
assert alignment(_opaque_pthread_rwlockattr_t) == 4, alignment(_opaque_pthread_rwlockattr_t)
|
| 2172 |
+
class _opaque_pthread_t(Structure):
|
| 2173 |
+
pass
|
| 2174 |
+
_opaque_pthread_t._fields_ = [
|
| 2175 |
+
('__sig', c_long),
|
| 2176 |
+
('__cleanup_stack', POINTER(__darwin_pthread_handler_rec)),
|
| 2177 |
+
('__opaque', c_char * 596),
|
| 2178 |
+
]
|
| 2179 |
+
assert sizeof(_opaque_pthread_t) == 604, sizeof(_opaque_pthread_t)
|
| 2180 |
+
assert alignment(_opaque_pthread_t) == 4, alignment(_opaque_pthread_t)
|
| 2181 |
+
__darwin_blkcnt_t = __int64_t
|
| 2182 |
+
__darwin_blksize_t = __int32_t
|
| 2183 |
+
__darwin_fsblkcnt_t = c_uint
|
| 2184 |
+
__darwin_fsfilcnt_t = c_uint
|
| 2185 |
+
__darwin_gid_t = __uint32_t
|
| 2186 |
+
__darwin_id_t = __uint32_t
|
| 2187 |
+
__darwin_ino_t = __uint32_t
|
| 2188 |
+
__darwin_mach_port_name_t = __darwin_natural_t
|
| 2189 |
+
__darwin_mach_port_t = __darwin_mach_port_name_t
|
| 2190 |
+
__darwin_mcontext_t = POINTER(mcontext)
|
| 2191 |
+
__darwin_mcontext64_t = POINTER(mcontext64)
|
| 2192 |
+
__darwin_pid_t = __int32_t
|
| 2193 |
+
__darwin_pthread_attr_t = _opaque_pthread_attr_t
|
| 2194 |
+
__darwin_pthread_cond_t = _opaque_pthread_cond_t
|
| 2195 |
+
__darwin_pthread_condattr_t = _opaque_pthread_condattr_t
|
| 2196 |
+
__darwin_pthread_key_t = c_ulong
|
| 2197 |
+
__darwin_pthread_mutex_t = _opaque_pthread_mutex_t
|
| 2198 |
+
__darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t
|
| 2199 |
+
__darwin_pthread_once_t = _opaque_pthread_once_t
|
| 2200 |
+
__darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t
|
| 2201 |
+
__darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t
|
| 2202 |
+
__darwin_pthread_t = POINTER(_opaque_pthread_t)
|
| 2203 |
+
__darwin_sigset_t = __uint32_t
|
| 2204 |
+
__darwin_suseconds_t = __int32_t
|
| 2205 |
+
__darwin_uid_t = __uint32_t
|
| 2206 |
+
__darwin_useconds_t = __uint32_t
|
| 2207 |
+
__darwin_uuid_t = c_ubyte * 16
|
| 2208 |
+
class sigaltstack(Structure):
|
| 2209 |
+
pass
|
| 2210 |
+
sigaltstack._fields_ = [
|
| 2211 |
+
('ss_sp', c_void_p),
|
| 2212 |
+
('ss_size', __darwin_size_t),
|
| 2213 |
+
('ss_flags', c_int),
|
| 2214 |
+
]
|
| 2215 |
+
assert sizeof(sigaltstack) == 12, sizeof(sigaltstack)
|
| 2216 |
+
assert alignment(sigaltstack) == 4, alignment(sigaltstack)
|
| 2217 |
+
__darwin_stack_t = sigaltstack
|
| 2218 |
+
class ucontext(Structure):
|
| 2219 |
+
pass
|
| 2220 |
+
ucontext._fields_ = [
|
| 2221 |
+
('uc_onstack', c_int),
|
| 2222 |
+
('uc_sigmask', __darwin_sigset_t),
|
| 2223 |
+
('uc_stack', __darwin_stack_t),
|
| 2224 |
+
('uc_link', POINTER(ucontext)),
|
| 2225 |
+
('uc_mcsize', __darwin_size_t),
|
| 2226 |
+
('uc_mcontext', __darwin_mcontext_t),
|
| 2227 |
+
]
|
| 2228 |
+
assert sizeof(ucontext) == 32, sizeof(ucontext)
|
| 2229 |
+
assert alignment(ucontext) == 4, alignment(ucontext)
|
| 2230 |
+
__darwin_ucontext_t = ucontext
|
| 2231 |
+
class ucontext64(Structure):
|
| 2232 |
+
pass
|
| 2233 |
+
ucontext64._fields_ = [
|
| 2234 |
+
('uc_onstack', c_int),
|
| 2235 |
+
('uc_sigmask', __darwin_sigset_t),
|
| 2236 |
+
('uc_stack', __darwin_stack_t),
|
| 2237 |
+
('uc_link', POINTER(ucontext64)),
|
| 2238 |
+
('uc_mcsize', __darwin_size_t),
|
| 2239 |
+
('uc_mcontext64', __darwin_mcontext64_t),
|
| 2240 |
+
]
|
| 2241 |
+
assert sizeof(ucontext64) == 32, sizeof(ucontext64)
|
| 2242 |
+
assert alignment(ucontext64) == 4, alignment(ucontext64)
|
| 2243 |
+
__darwin_ucontext64_t = ucontext64
|
| 2244 |
+
class timeval(Structure):
|
| 2245 |
+
pass
|
| 2246 |
+
timeval._fields_ = [
|
| 2247 |
+
('tv_sec', __darwin_time_t),
|
| 2248 |
+
('tv_usec', __darwin_suseconds_t),
|
| 2249 |
+
]
|
| 2250 |
+
assert sizeof(timeval) == 8, sizeof(timeval)
|
| 2251 |
+
assert alignment(timeval) == 4, alignment(timeval)
|
| 2252 |
+
rlim_t = __int64_t
|
| 2253 |
+
class rusage(Structure):
|
| 2254 |
+
pass
|
| 2255 |
+
rusage._fields_ = [
|
| 2256 |
+
('ru_utime', timeval),
|
| 2257 |
+
('ru_stime', timeval),
|
| 2258 |
+
('ru_maxrss', c_long),
|
| 2259 |
+
('ru_ixrss', c_long),
|
| 2260 |
+
('ru_idrss', c_long),
|
| 2261 |
+
('ru_isrss', c_long),
|
| 2262 |
+
('ru_minflt', c_long),
|
| 2263 |
+
('ru_majflt', c_long),
|
| 2264 |
+
('ru_nswap', c_long),
|
| 2265 |
+
('ru_inblock', c_long),
|
| 2266 |
+
('ru_oublock', c_long),
|
| 2267 |
+
('ru_msgsnd', c_long),
|
| 2268 |
+
('ru_msgrcv', c_long),
|
| 2269 |
+
('ru_nsignals', c_long),
|
| 2270 |
+
('ru_nvcsw', c_long),
|
| 2271 |
+
('ru_nivcsw', c_long),
|
| 2272 |
+
]
|
| 2273 |
+
assert sizeof(rusage) == 72, sizeof(rusage)
|
| 2274 |
+
assert alignment(rusage) == 4, alignment(rusage)
|
| 2275 |
+
class rlimit(Structure):
|
| 2276 |
+
pass
|
| 2277 |
+
rlimit._pack_ = 4
|
| 2278 |
+
rlimit._fields_ = [
|
| 2279 |
+
('rlim_cur', rlim_t),
|
| 2280 |
+
('rlim_max', rlim_t),
|
| 2281 |
+
]
|
| 2282 |
+
assert sizeof(rlimit) == 16, sizeof(rlimit)
|
| 2283 |
+
assert alignment(rlimit) == 4, alignment(rlimit)
|
| 2284 |
+
mcontext_t = __darwin_mcontext_t
|
| 2285 |
+
mcontext64_t = __darwin_mcontext64_t
|
| 2286 |
+
pthread_attr_t = __darwin_pthread_attr_t
|
| 2287 |
+
sigset_t = __darwin_sigset_t
|
| 2288 |
+
ucontext_t = __darwin_ucontext_t
|
| 2289 |
+
ucontext64_t = __darwin_ucontext64_t
|
| 2290 |
+
uid_t = __darwin_uid_t
|
| 2291 |
+
class sigval(Union):
|
| 2292 |
+
pass
|
| 2293 |
+
sigval._fields_ = [
|
| 2294 |
+
('sival_int', c_int),
|
| 2295 |
+
('sival_ptr', c_void_p),
|
| 2296 |
+
]
|
| 2297 |
+
assert sizeof(sigval) == 4, sizeof(sigval)
|
| 2298 |
+
assert alignment(sigval) == 4, alignment(sigval)
|
| 2299 |
+
class sigevent(Structure):
|
| 2300 |
+
pass
|
| 2301 |
+
sigevent._fields_ = [
|
| 2302 |
+
('sigev_notify', c_int),
|
| 2303 |
+
('sigev_signo', c_int),
|
| 2304 |
+
('sigev_value', sigval),
|
| 2305 |
+
('sigev_notify_function', CFUNCTYPE(None, sigval)),
|
| 2306 |
+
('sigev_notify_attributes', POINTER(pthread_attr_t)),
|
| 2307 |
+
]
|
| 2308 |
+
assert sizeof(sigevent) == 20, sizeof(sigevent)
|
| 2309 |
+
assert alignment(sigevent) == 4, alignment(sigevent)
|
| 2310 |
+
class __siginfo(Structure):
|
| 2311 |
+
pass
|
| 2312 |
+
pid_t = __darwin_pid_t
|
| 2313 |
+
__siginfo._fields_ = [
|
| 2314 |
+
('si_signo', c_int),
|
| 2315 |
+
('si_errno', c_int),
|
| 2316 |
+
('si_code', c_int),
|
| 2317 |
+
('si_pid', pid_t),
|
| 2318 |
+
('si_uid', uid_t),
|
| 2319 |
+
('si_status', c_int),
|
| 2320 |
+
('si_addr', c_void_p),
|
| 2321 |
+
('si_value', sigval),
|
| 2322 |
+
('si_band', c_long),
|
| 2323 |
+
('pad', c_ulong * 7),
|
| 2324 |
+
]
|
| 2325 |
+
assert sizeof(__siginfo) == 64, sizeof(__siginfo)
|
| 2326 |
+
assert alignment(__siginfo) == 4, alignment(__siginfo)
|
| 2327 |
+
siginfo_t = __siginfo
|
| 2328 |
+
class __sigaction_u(Union):
|
| 2329 |
+
pass
|
| 2330 |
+
__sigaction_u._fields_ = [
|
| 2331 |
+
('__sa_handler', CFUNCTYPE(None, c_int)),
|
| 2332 |
+
('__sa_sigaction', CFUNCTYPE(None, c_int, POINTER(__siginfo), c_void_p)),
|
| 2333 |
+
]
|
| 2334 |
+
assert sizeof(__sigaction_u) == 4, sizeof(__sigaction_u)
|
| 2335 |
+
assert alignment(__sigaction_u) == 4, alignment(__sigaction_u)
|
| 2336 |
+
class __sigaction(Structure):
|
| 2337 |
+
pass
|
| 2338 |
+
__sigaction._fields_ = [
|
| 2339 |
+
('__sigaction_u', __sigaction_u),
|
| 2340 |
+
('sa_tramp', CFUNCTYPE(None, c_void_p, c_int, c_int, POINTER(siginfo_t), c_void_p)),
|
| 2341 |
+
('sa_mask', sigset_t),
|
| 2342 |
+
('sa_flags', c_int),
|
| 2343 |
+
]
|
| 2344 |
+
assert sizeof(__sigaction) == 16, sizeof(__sigaction)
|
| 2345 |
+
assert alignment(__sigaction) == 4, alignment(__sigaction)
|
| 2346 |
+
class sigaction(Structure):
|
| 2347 |
+
pass
|
| 2348 |
+
sigaction._fields_ = [
|
| 2349 |
+
('__sigaction_u', __sigaction_u),
|
| 2350 |
+
('sa_mask', sigset_t),
|
| 2351 |
+
('sa_flags', c_int),
|
| 2352 |
+
]
|
| 2353 |
+
assert sizeof(sigaction) == 12, sizeof(sigaction)
|
| 2354 |
+
assert alignment(sigaction) == 4, alignment(sigaction)
|
| 2355 |
+
sig_t = CFUNCTYPE(None, c_int)
|
| 2356 |
+
stack_t = __darwin_stack_t
|
| 2357 |
+
class sigvec(Structure):
|
| 2358 |
+
pass
|
| 2359 |
+
sigvec._fields_ = [
|
| 2360 |
+
('sv_handler', CFUNCTYPE(None, c_int)),
|
| 2361 |
+
('sv_mask', c_int),
|
| 2362 |
+
('sv_flags', c_int),
|
| 2363 |
+
]
|
| 2364 |
+
assert sizeof(sigvec) == 12, sizeof(sigvec)
|
| 2365 |
+
assert alignment(sigvec) == 4, alignment(sigvec)
|
| 2366 |
+
class sigstack(Structure):
|
| 2367 |
+
pass
|
| 2368 |
+
sigstack._fields_ = [
|
| 2369 |
+
('ss_sp', STRING),
|
| 2370 |
+
('ss_onstack', c_int),
|
| 2371 |
+
]
|
| 2372 |
+
assert sizeof(sigstack) == 8, sizeof(sigstack)
|
| 2373 |
+
assert alignment(sigstack) == 4, alignment(sigstack)
|
| 2374 |
+
u_char = c_ubyte
|
| 2375 |
+
u_short = c_ushort
|
| 2376 |
+
u_int = c_uint
|
| 2377 |
+
u_long = c_ulong
|
| 2378 |
+
ushort = c_ushort
|
| 2379 |
+
uint = c_uint
|
| 2380 |
+
u_quad_t = u_int64_t
|
| 2381 |
+
quad_t = int64_t
|
| 2382 |
+
qaddr_t = POINTER(quad_t)
|
| 2383 |
+
caddr_t = STRING
|
| 2384 |
+
daddr_t = int32_t
|
| 2385 |
+
fixpt_t = u_int32_t
|
| 2386 |
+
blkcnt_t = __darwin_blkcnt_t
|
| 2387 |
+
blksize_t = __darwin_blksize_t
|
| 2388 |
+
gid_t = __darwin_gid_t
|
| 2389 |
+
in_addr_t = __uint32_t
|
| 2390 |
+
in_port_t = __uint16_t
|
| 2391 |
+
ino_t = __darwin_ino_t
|
| 2392 |
+
key_t = __int32_t
|
| 2393 |
+
nlink_t = __uint16_t
|
| 2394 |
+
off_t = __darwin_off_t
|
| 2395 |
+
segsz_t = int32_t
|
| 2396 |
+
swblk_t = int32_t
|
| 2397 |
+
clock_t = __darwin_clock_t
|
| 2398 |
+
ssize_t = __darwin_ssize_t
|
| 2399 |
+
useconds_t = __darwin_useconds_t
|
| 2400 |
+
suseconds_t = __darwin_suseconds_t
|
| 2401 |
+
fd_mask = __int32_t
|
| 2402 |
+
class fd_set(Structure):
|
| 2403 |
+
pass
|
| 2404 |
+
fd_set._fields_ = [
|
| 2405 |
+
('fds_bits', __int32_t * 32),
|
| 2406 |
+
]
|
| 2407 |
+
assert sizeof(fd_set) == 128, sizeof(fd_set)
|
| 2408 |
+
assert alignment(fd_set) == 4, alignment(fd_set)
|
| 2409 |
+
pthread_cond_t = __darwin_pthread_cond_t
|
| 2410 |
+
pthread_condattr_t = __darwin_pthread_condattr_t
|
| 2411 |
+
pthread_mutex_t = __darwin_pthread_mutex_t
|
| 2412 |
+
pthread_mutexattr_t = __darwin_pthread_mutexattr_t
|
| 2413 |
+
pthread_once_t = __darwin_pthread_once_t
|
| 2414 |
+
pthread_rwlock_t = __darwin_pthread_rwlock_t
|
| 2415 |
+
pthread_rwlockattr_t = __darwin_pthread_rwlockattr_t
|
| 2416 |
+
pthread_t = __darwin_pthread_t
|
| 2417 |
+
pthread_key_t = __darwin_pthread_key_t
|
| 2418 |
+
fsblkcnt_t = __darwin_fsblkcnt_t
|
| 2419 |
+
fsfilcnt_t = __darwin_fsfilcnt_t
|
| 2420 |
+
|
| 2421 |
+
# values for enumeration 'idtype_t'
|
| 2422 |
+
idtype_t = c_int # enum
|
| 2423 |
+
id_t = __darwin_id_t
|
| 2424 |
+
class wait(Union):
|
| 2425 |
+
pass
|
| 2426 |
+
class N4wait3DOLLAR_3E(Structure):
|
| 2427 |
+
pass
|
| 2428 |
+
N4wait3DOLLAR_3E._fields_ = [
|
| 2429 |
+
('w_Termsig', c_uint, 7),
|
| 2430 |
+
('w_Coredump', c_uint, 1),
|
| 2431 |
+
('w_Retcode', c_uint, 8),
|
| 2432 |
+
('w_Filler', c_uint, 16),
|
| 2433 |
+
]
|
| 2434 |
+
assert sizeof(N4wait3DOLLAR_3E) == 4, sizeof(N4wait3DOLLAR_3E)
|
| 2435 |
+
assert alignment(N4wait3DOLLAR_3E) == 4, alignment(N4wait3DOLLAR_3E)
|
| 2436 |
+
class N4wait3DOLLAR_4E(Structure):
|
| 2437 |
+
pass
|
| 2438 |
+
N4wait3DOLLAR_4E._fields_ = [
|
| 2439 |
+
('w_Stopval', c_uint, 8),
|
| 2440 |
+
('w_Stopsig', c_uint, 8),
|
| 2441 |
+
('w_Filler', c_uint, 16),
|
| 2442 |
+
]
|
| 2443 |
+
assert sizeof(N4wait3DOLLAR_4E) == 4, sizeof(N4wait3DOLLAR_4E)
|
| 2444 |
+
assert alignment(N4wait3DOLLAR_4E) == 4, alignment(N4wait3DOLLAR_4E)
|
| 2445 |
+
wait._fields_ = [
|
| 2446 |
+
('w_status', c_int),
|
| 2447 |
+
('w_T', N4wait3DOLLAR_3E),
|
| 2448 |
+
('w_S', N4wait3DOLLAR_4E),
|
| 2449 |
+
]
|
| 2450 |
+
assert sizeof(wait) == 4, sizeof(wait)
|
| 2451 |
+
assert alignment(wait) == 4, alignment(wait)
|
| 2452 |
+
class timespec(Structure):
|
| 2453 |
+
pass
|
| 2454 |
+
timespec._fields_ = [
|
| 2455 |
+
('tv_sec', time_t),
|
| 2456 |
+
('tv_nsec', c_long),
|
| 2457 |
+
]
|
| 2458 |
+
assert sizeof(timespec) == 8, sizeof(timespec)
|
| 2459 |
+
assert alignment(timespec) == 4, alignment(timespec)
|
| 2460 |
+
class tm(Structure):
|
| 2461 |
+
pass
|
| 2462 |
+
tm._fields_ = [
|
| 2463 |
+
('tm_sec', c_int),
|
| 2464 |
+
('tm_min', c_int),
|
| 2465 |
+
('tm_hour', c_int),
|
| 2466 |
+
('tm_mday', c_int),
|
| 2467 |
+
('tm_mon', c_int),
|
| 2468 |
+
('tm_year', c_int),
|
| 2469 |
+
('tm_wday', c_int),
|
| 2470 |
+
('tm_yday', c_int),
|
| 2471 |
+
('tm_isdst', c_int),
|
| 2472 |
+
('tm_gmtoff', c_long),
|
| 2473 |
+
('tm_zone', STRING),
|
| 2474 |
+
]
|
| 2475 |
+
assert sizeof(tm) == 44, sizeof(tm)
|
| 2476 |
+
assert alignment(tm) == 4, alignment(tm)
|
| 2477 |
+
__gnuc_va_list = STRING
|
| 2478 |
+
ptrdiff_t = c_int
|
| 2479 |
+
int8_t = c_byte
|
| 2480 |
+
int16_t = c_short
|
| 2481 |
+
uint8_t = c_ubyte
|
| 2482 |
+
uint16_t = c_ushort
|
| 2483 |
+
uint32_t = c_uint
|
| 2484 |
+
uint64_t = c_ulonglong
|
| 2485 |
+
int_least8_t = int8_t
|
| 2486 |
+
int_least16_t = int16_t
|
| 2487 |
+
int_least32_t = int32_t
|
| 2488 |
+
int_least64_t = int64_t
|
| 2489 |
+
uint_least8_t = uint8_t
|
| 2490 |
+
uint_least16_t = uint16_t
|
| 2491 |
+
uint_least32_t = uint32_t
|
| 2492 |
+
uint_least64_t = uint64_t
|
| 2493 |
+
int_fast8_t = int8_t
|
| 2494 |
+
int_fast16_t = int16_t
|
| 2495 |
+
int_fast32_t = int32_t
|
| 2496 |
+
int_fast64_t = int64_t
|
| 2497 |
+
uint_fast8_t = uint8_t
|
| 2498 |
+
uint_fast16_t = uint16_t
|
| 2499 |
+
uint_fast32_t = uint32_t
|
| 2500 |
+
uint_fast64_t = uint64_t
|
| 2501 |
+
intptr_t = c_long
|
| 2502 |
+
uintptr_t = c_ulong
|
| 2503 |
+
intmax_t = c_longlong
|
| 2504 |
+
uintmax_t = c_ulonglong
|
| 2505 |
+
__all__ = ['ENGINE', 'pkcs7_enc_content_st', '__int16_t',
|
| 2506 |
+
'X509_REVOKED', 'SSL_CTX', 'UIT_BOOLEAN',
|
| 2507 |
+
'__darwin_time_t', 'ucontext64_t', 'int_fast32_t',
|
| 2508 |
+
'pem_ctx_st', 'uint8_t', 'fpos_t', 'X509', 'COMP_CTX',
|
| 2509 |
+
'tm', 'N10pem_ctx_st4DOLLAR_17E', 'swblk_t',
|
| 2510 |
+
'ASN1_TEMPLATE', '__darwin_pthread_t', 'fixpt_t',
|
| 2511 |
+
'BIO_METHOD', 'ASN1_PRINTABLESTRING', 'EVP_ENCODE_CTX',
|
| 2512 |
+
'dh_method', 'bio_f_buffer_ctx_struct', 'in_port_t',
|
| 2513 |
+
'X509_SIG', '__darwin_ssize_t', '__darwin_sigset_t',
|
| 2514 |
+
'wait', 'uint_fast16_t', 'N12asn1_type_st4DOLLAR_11E',
|
| 2515 |
+
'uint_least8_t', 'pthread_rwlock_t', 'ASN1_IA5STRING',
|
| 2516 |
+
'fsfilcnt_t', 'ucontext', '__uint64_t', 'timespec',
|
| 2517 |
+
'x509_cinf_st', 'COMP_METHOD', 'MD5_CTX', 'buf_mem_st',
|
| 2518 |
+
'ASN1_ENCODING_st', 'PBEPARAM', 'X509_NAME_ENTRY',
|
| 2519 |
+
'__darwin_va_list', 'ucontext_t', 'lhash_st',
|
| 2520 |
+
'N4wait3DOLLAR_4E', '__darwin_uuid_t',
|
| 2521 |
+
'_ossl_old_des_ks_struct', 'id_t', 'ASN1_BIT_STRING',
|
| 2522 |
+
'va_list', '__darwin_wchar_t', 'pthread_key_t',
|
| 2523 |
+
'pkcs7_signer_info_st', 'ASN1_METHOD', 'DSA_SIG', 'DSA',
|
| 2524 |
+
'UIT_NONE', 'pthread_t', '__darwin_useconds_t',
|
| 2525 |
+
'uint_fast8_t', 'UI_STRING', 'DES_cblock',
|
| 2526 |
+
'__darwin_mcontext64_t', 'rlim_t', 'PEM_Encode_Seal_st',
|
| 2527 |
+
'SHAstate_st', 'u_quad_t', 'openssl_fptr',
|
| 2528 |
+
'_opaque_pthread_rwlockattr_t',
|
| 2529 |
+
'N18x509_attributes_st4DOLLAR_13E',
|
| 2530 |
+
'__darwin_pthread_rwlock_t', 'daddr_t', 'ui_string_st',
|
| 2531 |
+
'x509_file_st', 'X509_req_info_st', 'int_least64_t',
|
| 2532 |
+
'evp_Encode_Ctx_st', 'X509_OBJECTS', 'CRYPTO_EX_DATA',
|
| 2533 |
+
'__int8_t', 'AUTHORITY_KEYID_st', '_opaque_pthread_attr_t',
|
| 2534 |
+
'sigstack', 'EVP_CIPHER_CTX', 'X509_extension_st', 'pid_t',
|
| 2535 |
+
'RSA_METHOD', 'PEM_USER', 'pem_recip_st', 'env_md_ctx_st',
|
| 2536 |
+
'rc5_key_st', 'ui_st', 'X509_PUBKEY', 'u_int8_t',
|
| 2537 |
+
'ASN1_ITEM_st', 'pkcs7_recip_info_st', 'ssl2_state_st',
|
| 2538 |
+
'off_t', 'N10ssl_ctx_st4DOLLAR_18E', 'crypto_ex_data_st',
|
| 2539 |
+
'ui_method_st', '__darwin_pthread_rwlockattr_t',
|
| 2540 |
+
'CRYPTO_EX_dup', '__darwin_ino_t', '__sFILE',
|
| 2541 |
+
'OSUnknownByteOrder', 'BN_MONT_CTX', 'ASN1_NULL', 'time_t',
|
| 2542 |
+
'CRYPTO_EX_new', 'asn1_type_st', 'CRYPTO_EX_DATA_FUNCS',
|
| 2543 |
+
'user_time_t', 'BIGNUM', 'pthread_rwlockattr_t',
|
| 2544 |
+
'ASN1_VALUE_st', 'DH_METHOD', '__darwin_off_t',
|
| 2545 |
+
'_opaque_pthread_t', 'bn_blinding_st', 'RSA', 'ssize_t',
|
| 2546 |
+
'mcontext64_t', 'user_long_t', 'fsblkcnt_t', 'cert_st',
|
| 2547 |
+
'__darwin_pthread_condattr_t', 'X509_PKEY',
|
| 2548 |
+
'__darwin_id_t', '__darwin_nl_item', 'SSL2_STATE', 'FILE',
|
| 2549 |
+
'pthread_mutexattr_t', 'size_t',
|
| 2550 |
+
'_ossl_old_des_key_schedule', 'pkcs7_issuer_and_serial_st',
|
| 2551 |
+
'sigval', 'CRYPTO_MEM_LEAK_CB', 'X509_NAME', 'blkcnt_t',
|
| 2552 |
+
'uint_least16_t', '__darwin_dev_t', 'evp_cipher_info_st',
|
| 2553 |
+
'BN_BLINDING', 'ssl3_state_st', 'uint_least64_t',
|
| 2554 |
+
'user_addr_t', 'DES_key_schedule', 'RIPEMD160_CTX',
|
| 2555 |
+
'u_char', 'X509_algor_st', 'uid_t', 'sess_cert_st',
|
| 2556 |
+
'u_int64_t', 'u_int16_t', 'sigset_t', '__darwin_ptrdiff_t',
|
| 2557 |
+
'ASN1_CTX', 'STACK', '__int32_t', 'UI_METHOD',
|
| 2558 |
+
'NETSCAPE_SPKI', 'UIT_PROMPT', 'st_CRYPTO_EX_DATA_IMPL',
|
| 2559 |
+
'cast_key_st', 'X509_HASH_DIR_CTX', 'sigevent',
|
| 2560 |
+
'user_ssize_t', 'clock_t', 'aes_key_st',
|
| 2561 |
+
'__darwin_socklen_t', '__darwin_intptr_t', 'int_fast64_t',
|
| 2562 |
+
'asn1_string_table_st', 'uint_fast32_t',
|
| 2563 |
+
'ASN1_VISIBLESTRING', 'DSA_SIG_st', 'obj_name_st',
|
| 2564 |
+
'X509_LOOKUP_METHOD', 'u_int32_t', 'EVP_CIPHER_INFO',
|
| 2565 |
+
'__gnuc_va_list', 'AES_KEY', 'PKCS7_ISSUER_AND_SERIAL',
|
| 2566 |
+
'BN_CTX', '__darwin_blkcnt_t', 'key_t', 'SHA_CTX',
|
| 2567 |
+
'pkcs7_signed_st', 'SSL', 'N10pem_ctx_st4DOLLAR_16E',
|
| 2568 |
+
'pthread_attr_t', 'EVP_MD', 'uint', 'ASN1_BOOLEAN',
|
| 2569 |
+
'ino_t', '__darwin_clock_t', 'ASN1_OCTET_STRING',
|
| 2570 |
+
'asn1_ctx_st', 'BIO_F_BUFFER_CTX', 'bn_mont_ctx_st',
|
| 2571 |
+
'X509_REQ_INFO', 'PEM_CTX', 'sigvec',
|
| 2572 |
+
'__darwin_pthread_mutexattr_t', 'x509_attributes_st',
|
| 2573 |
+
'stack_t', '__darwin_mode_t', '__mbstate_t',
|
| 2574 |
+
'asn1_object_st', 'ASN1_ENCODING', '__uint8_t',
|
| 2575 |
+
'LHASH_NODE', 'PKCS7_SIGNER_INFO', 'asn1_method_st',
|
| 2576 |
+
'stack_st', 'bio_info_cb', 'div_t', 'UIT_VERIFY',
|
| 2577 |
+
'PBEPARAM_st', 'N4wait3DOLLAR_3E', 'quad_t', '__siginfo',
|
| 2578 |
+
'__darwin_mbstate_t', 'rsa_st', 'ASN1_UNIVERSALSTRING',
|
| 2579 |
+
'uint64_t', 'ssl_comp_st', 'X509_OBJECT', 'pthread_cond_t',
|
| 2580 |
+
'DH', '__darwin_wctype_t', 'PKCS7_ENVELOPE', 'ASN1_TLC_st',
|
| 2581 |
+
'sig_atomic_t', 'BIO', 'nlink_t', 'BUF_MEM', 'SSL3_RECORD',
|
| 2582 |
+
'bio_method_st', 'timeval', 'UI_string_types', 'BIO_dummy',
|
| 2583 |
+
'ssl_ctx_st', 'NETSCAPE_CERT_SEQUENCE',
|
| 2584 |
+
'BIT_STRING_BITNAME_st', '__darwin_pthread_attr_t',
|
| 2585 |
+
'int8_t', '__darwin_wint_t', 'OBJ_NAME',
|
| 2586 |
+
'PKCS8_PRIV_KEY_INFO', 'PBE2PARAM_st',
|
| 2587 |
+
'LHASH_DOALL_FN_TYPE', 'x509_st', 'X509_VAL', 'dev_t',
|
| 2588 |
+
'ASN1_TEMPLATE_st', 'MD5state_st', '__uint16_t',
|
| 2589 |
+
'LHASH_DOALL_ARG_FN_TYPE', 'mdc2_ctx_st', 'SSL3_STATE',
|
| 2590 |
+
'ssl3_buffer_st', 'ASN1_ITEM_EXP',
|
| 2591 |
+
'_opaque_pthread_condattr_t', 'mode_t', 'ASN1_VALUE',
|
| 2592 |
+
'qaddr_t', '__darwin_gid_t', 'EVP_PKEY', 'CRYPTO_EX_free',
|
| 2593 |
+
'_ossl_old_des_cblock', 'X509_INFO', 'asn1_string_st',
|
| 2594 |
+
'intptr_t', 'UIT_INFO', 'int_fast8_t', 'sigaltstack',
|
| 2595 |
+
'env_md_st', 'LHASH', '__darwin_ucontext_t',
|
| 2596 |
+
'PKCS7_SIGN_ENVELOPE', '__darwin_mcontext_t', 'ct_rune_t',
|
| 2597 |
+
'MD2_CTX', 'pthread_once_t', 'SSL3_BUFFER', 'fd_mask',
|
| 2598 |
+
'ASN1_TYPE', 'PKCS7_SIGNED', 'ssl3_record_st', 'BF_KEY',
|
| 2599 |
+
'MD4state_st', 'MD4_CTX', 'int16_t', 'SSL_CIPHER',
|
| 2600 |
+
'rune_t', 'X509_TRUST', 'siginfo_t', 'X509_STORE',
|
| 2601 |
+
'__sbuf', 'X509_STORE_CTX', '__darwin_blksize_t', 'ldiv_t',
|
| 2602 |
+
'ASN1_TIME', 'SSL_METHOD', 'X509_LOOKUP',
|
| 2603 |
+
'Netscape_spki_st', 'P_PID', 'sigaction', 'sig_t',
|
| 2604 |
+
'hostent', 'x509_cert_aux_st', '_opaque_pthread_cond_t',
|
| 2605 |
+
'segsz_t', 'ushort', '__darwin_ct_rune_t', 'fd_set',
|
| 2606 |
+
'BN_RECP_CTX', 'x509_lookup_st', 'uint16_t', 'pkcs7_st',
|
| 2607 |
+
'asn1_header_st', '__darwin_pthread_key_t',
|
| 2608 |
+
'x509_trust_st', '__darwin_pthread_handler_rec', 'int32_t',
|
| 2609 |
+
'X509_CRL_INFO', 'N11evp_pkey_st4DOLLAR_12E', 'MDC2_CTX',
|
| 2610 |
+
'N23_ossl_old_des_ks_struct4DOLLAR_10E', 'ASN1_HEADER',
|
| 2611 |
+
'X509_crl_info_st', 'LHASH_HASH_FN_TYPE',
|
| 2612 |
+
'_opaque_pthread_mutexattr_t', 'ssl_st',
|
| 2613 |
+
'N8pkcs7_st4DOLLAR_15E', 'evp_pkey_st',
|
| 2614 |
+
'pkcs7_signedandenveloped_st', '__darwin_mach_port_t',
|
| 2615 |
+
'EVP_PBE_KEYGEN', '_opaque_pthread_mutex_t',
|
| 2616 |
+
'ASN1_UTCTIME', 'mcontext', 'crypto_ex_data_func_st',
|
| 2617 |
+
'u_long', 'PBKDF2PARAM_st', 'rc4_key_st', 'DSA_METHOD',
|
| 2618 |
+
'EVP_CIPHER', 'BIT_STRING_BITNAME', 'PKCS7_RECIP_INFO',
|
| 2619 |
+
'ssl3_enc_method', 'X509_CERT_AUX', 'uintmax_t',
|
| 2620 |
+
'int_fast16_t', 'RC5_32_KEY', 'ucontext64', 'ASN1_INTEGER',
|
| 2621 |
+
'u_short', 'N14x509_object_st4DOLLAR_14E', 'mcontext64',
|
| 2622 |
+
'X509_sig_st', 'ASN1_GENERALSTRING', 'PKCS7', '__sFILEX',
|
| 2623 |
+
'X509_name_entry_st', 'ssl_session_st', 'caddr_t',
|
| 2624 |
+
'bignum_st', 'X509_CINF', '__darwin_pthread_cond_t',
|
| 2625 |
+
'ASN1_TLC', 'PKCS7_ENCRYPT', 'NETSCAPE_SPKAC',
|
| 2626 |
+
'Netscape_spkac_st', 'idtype_t', 'UIT_ERROR',
|
| 2627 |
+
'uint_fast64_t', 'in_addr_t', 'pthread_mutex_t',
|
| 2628 |
+
'__int64_t', 'ASN1_BMPSTRING', 'uint32_t',
|
| 2629 |
+
'PEM_ENCODE_SEAL_CTX', 'suseconds_t', 'ASN1_OBJECT',
|
| 2630 |
+
'X509_val_st', 'private_key_st', 'CRYPTO_dynlock',
|
| 2631 |
+
'X509_objects_st', 'CRYPTO_EX_DATA_IMPL',
|
| 2632 |
+
'pthread_condattr_t', 'PKCS7_DIGEST', 'uint_least32_t',
|
| 2633 |
+
'ASN1_STRING', '__uint32_t', 'P_PGID', 'rsa_meth_st',
|
| 2634 |
+
'X509_crl_st', 'RC2_KEY', '__darwin_fsfilcnt_t',
|
| 2635 |
+
'X509_revoked_st', 'PBE2PARAM', 'blksize_t',
|
| 2636 |
+
'Netscape_certificate_sequence', 'ssl_cipher_st',
|
| 2637 |
+
'bignum_ctx', 'register_t', 'ASN1_UTF8STRING',
|
| 2638 |
+
'pkcs7_encrypted_st', 'RC4_KEY', '__darwin_ucontext64_t',
|
| 2639 |
+
'N13ssl2_state_st4DOLLAR_19E', 'bn_recp_ctx_st',
|
| 2640 |
+
'CAST_KEY', 'X509_ATTRIBUTE', '__darwin_suseconds_t',
|
| 2641 |
+
'__sigaction', 'user_ulong_t', 'syscall_arg_t',
|
| 2642 |
+
'evp_cipher_ctx_st', 'X509_ALGOR', 'mcontext_t',
|
| 2643 |
+
'const_DES_cblock', '__darwin_fsblkcnt_t', 'dsa_st',
|
| 2644 |
+
'int_least8_t', 'MD2state_st', 'X509_EXTENSION',
|
| 2645 |
+
'GEN_SESSION_CB', 'int_least16_t', '__darwin_wctrans_t',
|
| 2646 |
+
'PBKDF2PARAM', 'x509_lookup_method_st', 'pem_password_cb',
|
| 2647 |
+
'X509_info_st', 'x509_store_st', '__darwin_natural_t',
|
| 2648 |
+
'X509_pubkey_st', 'pkcs7_digest_st', '__darwin_size_t',
|
| 2649 |
+
'ASN1_STRING_TABLE', 'OSLittleEndian', 'RIPEMD160state_st',
|
| 2650 |
+
'pkcs7_enveloped_st', 'UI', 'ptrdiff_t', 'X509_REQ',
|
| 2651 |
+
'CRYPTO_dynlock_value', 'X509_req_st', 'x509_store_ctx_st',
|
| 2652 |
+
'N13ssl3_state_st4DOLLAR_20E', 'lhash_node_st',
|
| 2653 |
+
'__darwin_pthread_mutex_t', 'LHASH_COMP_FN_TYPE',
|
| 2654 |
+
'__darwin_rune_t', 'rlimit', '__darwin_pthread_once_t',
|
| 2655 |
+
'OSBigEndian', 'uintptr_t', '__darwin_uid_t', 'u_int',
|
| 2656 |
+
'ASN1_T61STRING', 'gid_t', 'ssl_method_st', 'ASN1_ITEM',
|
| 2657 |
+
'ASN1_ENUMERATED', '_opaque_pthread_rwlock_t',
|
| 2658 |
+
'pkcs8_priv_key_info_st', 'intmax_t', 'sigcontext',
|
| 2659 |
+
'X509_CRL', 'rc2_key_st', 'engine_st', 'x509_object_st',
|
| 2660 |
+
'_opaque_pthread_once_t', 'DES_ks', 'SSL_COMP',
|
| 2661 |
+
'dsa_method', 'int64_t', 'bio_st', 'bf_key_st',
|
| 2662 |
+
'ASN1_GENERALIZEDTIME', 'PKCS7_ENC_CONTENT',
|
| 2663 |
+
'__darwin_pid_t', 'lldiv_t', 'comp_method_st',
|
| 2664 |
+
'EVP_MD_CTX', 'evp_cipher_st', 'X509_name_st',
|
| 2665 |
+
'x509_hash_dir_st', '__darwin_mach_port_name_t',
|
| 2666 |
+
'useconds_t', 'user_size_t', 'SSL_SESSION', 'rusage',
|
| 2667 |
+
'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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Python test set -- part 1, grammar.
|
| 2 |
+
# This just tests whether the parser accepts them all.
|
| 3 |
+
|
| 4 |
+
# NOTE: When you run this test as a script from the command line, you
|
| 5 |
+
# get warnings about certain hex/oct constants. Since those are
|
| 6 |
+
# issued by the parser, you can't suppress them by adding a
|
| 7 |
+
# filterwarnings() call to this module. Therefore, to shut up the
|
| 8 |
+
# regression test, the filterwarnings() call has been added to
|
| 9 |
+
# regrtest.py.
|
| 10 |
+
|
| 11 |
+
from test.support import check_syntax_error
|
| 12 |
+
import unittest
|
| 13 |
+
import sys
|
| 14 |
+
# testing import *
|
| 15 |
+
from sys import *
|
| 16 |
+
|
| 17 |
+
class TokenTests(unittest.TestCase):
|
| 18 |
+
|
| 19 |
+
def testBackslash(self):
|
| 20 |
+
# Backslash means line continuation:
|
| 21 |
+
x = 1 \
|
| 22 |
+
+ 1
|
| 23 |
+
self.assertEquals(x, 2, 'backslash for line continuation')
|
| 24 |
+
|
| 25 |
+
# Backslash does not means continuation in comments :\
|
| 26 |
+
x = 0
|
| 27 |
+
self.assertEquals(x, 0, 'backslash ending comment')
|
| 28 |
+
|
| 29 |
+
def testPlainIntegers(self):
|
| 30 |
+
self.assertEquals(type(000), type(0))
|
| 31 |
+
self.assertEquals(0xff, 255)
|
| 32 |
+
self.assertEquals(0o377, 255)
|
| 33 |
+
self.assertEquals(2147483647, 0o17777777777)
|
| 34 |
+
self.assertEquals(0b1001, 9)
|
| 35 |
+
# "0x" is not a valid literal
|
| 36 |
+
self.assertRaises(SyntaxError, eval, "0x")
|
| 37 |
+
from sys import maxsize
|
| 38 |
+
if maxsize == 2147483647:
|
| 39 |
+
self.assertEquals(-2147483647-1, -0o20000000000)
|
| 40 |
+
# XXX -2147483648
|
| 41 |
+
self.assert_(0o37777777777 > 0)
|
| 42 |
+
self.assert_(0xffffffff > 0)
|
| 43 |
+
self.assert_(0b1111111111111111111111111111111 > 0)
|
| 44 |
+
for s in ('2147483648', '0o40000000000', '0x100000000',
|
| 45 |
+
'0b10000000000000000000000000000000'):
|
| 46 |
+
try:
|
| 47 |
+
x = eval(s)
|
| 48 |
+
except OverflowError:
|
| 49 |
+
self.fail("OverflowError on huge integer literal %r" % s)
|
| 50 |
+
elif maxsize == 9223372036854775807:
|
| 51 |
+
self.assertEquals(-9223372036854775807-1, -0o1000000000000000000000)
|
| 52 |
+
self.assert_(0o1777777777777777777777 > 0)
|
| 53 |
+
self.assert_(0xffffffffffffffff > 0)
|
| 54 |
+
self.assert_(0b11111111111111111111111111111111111111111111111111111111111111 > 0)
|
| 55 |
+
for s in '9223372036854775808', '0o2000000000000000000000', \
|
| 56 |
+
'0x10000000000000000', \
|
| 57 |
+
'0b100000000000000000000000000000000000000000000000000000000000000':
|
| 58 |
+
try:
|
| 59 |
+
x = eval(s)
|
| 60 |
+
except OverflowError:
|
| 61 |
+
self.fail("OverflowError on huge integer literal %r" % s)
|
| 62 |
+
else:
|
| 63 |
+
self.fail('Weird maxsize value %r' % maxsize)
|
| 64 |
+
|
| 65 |
+
def testLongIntegers(self):
|
| 66 |
+
x = 0
|
| 67 |
+
x = 0xffffffffffffffff
|
| 68 |
+
x = 0Xffffffffffffffff
|
| 69 |
+
x = 0o77777777777777777
|
| 70 |
+
x = 0O77777777777777777
|
| 71 |
+
x = 123456789012345678901234567890
|
| 72 |
+
x = 0b100000000000000000000000000000000000000000000000000000000000000000000
|
| 73 |
+
x = 0B111111111111111111111111111111111111111111111111111111111111111111111
|
| 74 |
+
|
| 75 |
+
def testUnderscoresInNumbers(self):
|
| 76 |
+
# Integers
|
| 77 |
+
x = 1_0
|
| 78 |
+
x = 123_456_7_89
|
| 79 |
+
x = 0xabc_123_4_5
|
| 80 |
+
x = 0X_abc_123
|
| 81 |
+
x = 0B11_01
|
| 82 |
+
x = 0b_11_01
|
| 83 |
+
x = 0o45_67
|
| 84 |
+
x = 0O_45_67
|
| 85 |
+
|
| 86 |
+
# Floats
|
| 87 |
+
x = 3_1.4
|
| 88 |
+
x = 03_1.4
|
| 89 |
+
x = 3_1.
|
| 90 |
+
x = .3_1
|
| 91 |
+
x = 3.1_4
|
| 92 |
+
x = 0_3.1_4
|
| 93 |
+
x = 3e1_4
|
| 94 |
+
x = 3_1e+4_1
|
| 95 |
+
x = 3_1E-4_1
|
| 96 |
+
|
| 97 |
+
def testFloats(self):
|
| 98 |
+
x = 3.14
|
| 99 |
+
x = 314.
|
| 100 |
+
x = 0.314
|
| 101 |
+
# XXX x = 000.314
|
| 102 |
+
x = .314
|
| 103 |
+
x = 3e14
|
| 104 |
+
x = 3E14
|
| 105 |
+
x = 3e-14
|
| 106 |
+
x = 3e+14
|
| 107 |
+
x = 3.e14
|
| 108 |
+
x = .3e14
|
| 109 |
+
x = 3.1e4
|
| 110 |
+
|
| 111 |
+
def testStringLiterals(self):
|
| 112 |
+
x = ''; y = ""; self.assert_(len(x) == 0 and x == y)
|
| 113 |
+
x = '\''; y = "'"; self.assert_(len(x) == 1 and x == y and ord(x) == 39)
|
| 114 |
+
x = '"'; y = "\""; self.assert_(len(x) == 1 and x == y and ord(x) == 34)
|
| 115 |
+
x = "doesn't \"shrink\" does it"
|
| 116 |
+
y = 'doesn\'t "shrink" does it'
|
| 117 |
+
self.assert_(len(x) == 24 and x == y)
|
| 118 |
+
x = "does \"shrink\" doesn't it"
|
| 119 |
+
y = 'does "shrink" doesn\'t it'
|
| 120 |
+
self.assert_(len(x) == 24 and x == y)
|
| 121 |
+
x = """
|
| 122 |
+
The "quick"
|
| 123 |
+
brown fox
|
| 124 |
+
jumps over
|
| 125 |
+
the 'lazy' dog.
|
| 126 |
+
"""
|
| 127 |
+
y = '\nThe "quick"\nbrown fox\njumps over\nthe \'lazy\' dog.\n'
|
| 128 |
+
self.assertEquals(x, y)
|
| 129 |
+
y = '''
|
| 130 |
+
The "quick"
|
| 131 |
+
brown fox
|
| 132 |
+
jumps over
|
| 133 |
+
the 'lazy' dog.
|
| 134 |
+
'''
|
| 135 |
+
self.assertEquals(x, y)
|
| 136 |
+
y = "\n\
|
| 137 |
+
The \"quick\"\n\
|
| 138 |
+
brown fox\n\
|
| 139 |
+
jumps over\n\
|
| 140 |
+
the 'lazy' dog.\n\
|
| 141 |
+
"
|
| 142 |
+
self.assertEquals(x, y)
|
| 143 |
+
y = '\n\
|
| 144 |
+
The \"quick\"\n\
|
| 145 |
+
brown fox\n\
|
| 146 |
+
jumps over\n\
|
| 147 |
+
the \'lazy\' dog.\n\
|
| 148 |
+
'
|
| 149 |
+
self.assertEquals(x, y)
|
| 150 |
+
x = rf"hello \{True}"; y = f"hello \\{True}"
|
| 151 |
+
self.assertEquals(x, y)
|
| 152 |
+
|
| 153 |
+
def testEllipsis(self):
|
| 154 |
+
x = ...
|
| 155 |
+
self.assert_(x is Ellipsis)
|
| 156 |
+
self.assertRaises(SyntaxError, eval, ".. .")
|
| 157 |
+
|
| 158 |
+
class GrammarTests(unittest.TestCase):
|
| 159 |
+
|
| 160 |
+
# single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
|
| 161 |
+
# XXX can't test in a script -- this rule is only used when interactive
|
| 162 |
+
|
| 163 |
+
# file_input: (NEWLINE | stmt)* ENDMARKER
|
| 164 |
+
# Being tested as this very moment this very module
|
| 165 |
+
|
| 166 |
+
# expr_input: testlist NEWLINE
|
| 167 |
+
# XXX Hard to test -- used only in calls to input()
|
| 168 |
+
|
| 169 |
+
def testEvalInput(self):
|
| 170 |
+
# testlist ENDMARKER
|
| 171 |
+
x = eval('1, 0 or 1')
|
| 172 |
+
|
| 173 |
+
def testFuncdef(self):
|
| 174 |
+
### [decorators] 'def' NAME parameters ['->' test] ':' suite
|
| 175 |
+
### decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
|
| 176 |
+
### decorators: decorator+
|
| 177 |
+
### parameters: '(' [typedargslist] ')'
|
| 178 |
+
### typedargslist: ((tfpdef ['=' test] ',')*
|
| 179 |
+
### ('*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef)
|
| 180 |
+
### | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])
|
| 181 |
+
### tfpdef: NAME [':' test]
|
| 182 |
+
### varargslist: ((vfpdef ['=' test] ',')*
|
| 183 |
+
### ('*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef)
|
| 184 |
+
### | vfpdef ['=' test] (',' vfpdef ['=' test])* [','])
|
| 185 |
+
### vfpdef: NAME
|
| 186 |
+
def f1(): pass
|
| 187 |
+
f1()
|
| 188 |
+
f1(*())
|
| 189 |
+
f1(*(), **{})
|
| 190 |
+
def f2(one_argument): pass
|
| 191 |
+
def f3(two, arguments): pass
|
| 192 |
+
self.assertEquals(f2.__code__.co_varnames, ('one_argument',))
|
| 193 |
+
self.assertEquals(f3.__code__.co_varnames, ('two', 'arguments'))
|
| 194 |
+
def a1(one_arg,): pass
|
| 195 |
+
def a2(two, args,): pass
|
| 196 |
+
def v0(*rest): pass
|
| 197 |
+
def v1(a, *rest): pass
|
| 198 |
+
def v2(a, b, *rest): pass
|
| 199 |
+
|
| 200 |
+
f1()
|
| 201 |
+
f2(1)
|
| 202 |
+
f2(1,)
|
| 203 |
+
f3(1, 2)
|
| 204 |
+
f3(1, 2,)
|
| 205 |
+
v0()
|
| 206 |
+
v0(1)
|
| 207 |
+
v0(1,)
|
| 208 |
+
v0(1,2)
|
| 209 |
+
v0(1,2,3,4,5,6,7,8,9,0)
|
| 210 |
+
v1(1)
|
| 211 |
+
v1(1,)
|
| 212 |
+
v1(1,2)
|
| 213 |
+
v1(1,2,3)
|
| 214 |
+
v1(1,2,3,4,5,6,7,8,9,0)
|
| 215 |
+
v2(1,2)
|
| 216 |
+
v2(1,2,3)
|
| 217 |
+
v2(1,2,3,4)
|
| 218 |
+
v2(1,2,3,4,5,6,7,8,9,0)
|
| 219 |
+
|
| 220 |
+
def d01(a=1): pass
|
| 221 |
+
d01()
|
| 222 |
+
d01(1)
|
| 223 |
+
d01(*(1,))
|
| 224 |
+
d01(**{'a':2})
|
| 225 |
+
def d11(a, b=1): pass
|
| 226 |
+
d11(1)
|
| 227 |
+
d11(1, 2)
|
| 228 |
+
d11(1, **{'b':2})
|
| 229 |
+
def d21(a, b, c=1): pass
|
| 230 |
+
d21(1, 2)
|
| 231 |
+
d21(1, 2, 3)
|
| 232 |
+
d21(*(1, 2, 3))
|
| 233 |
+
d21(1, *(2, 3))
|
| 234 |
+
d21(1, 2, *(3,))
|
| 235 |
+
d21(1, 2, **{'c':3})
|
| 236 |
+
def d02(a=1, b=2): pass
|
| 237 |
+
d02()
|
| 238 |
+
d02(1)
|
| 239 |
+
d02(1, 2)
|
| 240 |
+
d02(*(1, 2))
|
| 241 |
+
d02(1, *(2,))
|
| 242 |
+
d02(1, **{'b':2})
|
| 243 |
+
d02(**{'a': 1, 'b': 2})
|
| 244 |
+
def d12(a, b=1, c=2): pass
|
| 245 |
+
d12(1)
|
| 246 |
+
d12(1, 2)
|
| 247 |
+
d12(1, 2, 3)
|
| 248 |
+
def d22(a, b, c=1, d=2): pass
|
| 249 |
+
d22(1, 2)
|
| 250 |
+
d22(1, 2, 3)
|
| 251 |
+
d22(1, 2, 3, 4)
|
| 252 |
+
def d01v(a=1, *rest): pass
|
| 253 |
+
d01v()
|
| 254 |
+
d01v(1)
|
| 255 |
+
d01v(1, 2)
|
| 256 |
+
d01v(*(1, 2, 3, 4))
|
| 257 |
+
d01v(*(1,))
|
| 258 |
+
d01v(**{'a':2})
|
| 259 |
+
def d11v(a, b=1, *rest): pass
|
| 260 |
+
d11v(1)
|
| 261 |
+
d11v(1, 2)
|
| 262 |
+
d11v(1, 2, 3)
|
| 263 |
+
def d21v(a, b, c=1, *rest): pass
|
| 264 |
+
d21v(1, 2)
|
| 265 |
+
d21v(1, 2, 3)
|
| 266 |
+
d21v(1, 2, 3, 4)
|
| 267 |
+
d21v(*(1, 2, 3, 4))
|
| 268 |
+
d21v(1, 2, **{'c': 3})
|
| 269 |
+
def d02v(a=1, b=2, *rest): pass
|
| 270 |
+
d02v()
|
| 271 |
+
d02v(1)
|
| 272 |
+
d02v(1, 2)
|
| 273 |
+
d02v(1, 2, 3)
|
| 274 |
+
d02v(1, *(2, 3, 4))
|
| 275 |
+
d02v(**{'a': 1, 'b': 2})
|
| 276 |
+
def d12v(a, b=1, c=2, *rest): pass
|
| 277 |
+
d12v(1)
|
| 278 |
+
d12v(1, 2)
|
| 279 |
+
d12v(1, 2, 3)
|
| 280 |
+
d12v(1, 2, 3, 4)
|
| 281 |
+
d12v(*(1, 2, 3, 4))
|
| 282 |
+
d12v(1, 2, *(3, 4, 5))
|
| 283 |
+
d12v(1, *(2,), **{'c': 3})
|
| 284 |
+
def d22v(a, b, c=1, d=2, *rest): pass
|
| 285 |
+
d22v(1, 2)
|
| 286 |
+
d22v(1, 2, 3)
|
| 287 |
+
d22v(1, 2, 3, 4)
|
| 288 |
+
d22v(1, 2, 3, 4, 5)
|
| 289 |
+
d22v(*(1, 2, 3, 4))
|
| 290 |
+
d22v(1, 2, *(3, 4, 5))
|
| 291 |
+
d22v(1, *(2, 3), **{'d': 4})
|
| 292 |
+
|
| 293 |
+
# keyword argument type tests
|
| 294 |
+
try:
|
| 295 |
+
str('x', **{b'foo':1 })
|
| 296 |
+
except TypeError:
|
| 297 |
+
pass
|
| 298 |
+
else:
|
| 299 |
+
self.fail('Bytes should not work as keyword argument names')
|
| 300 |
+
# keyword only argument tests
|
| 301 |
+
def pos0key1(*, key): return key
|
| 302 |
+
pos0key1(key=100)
|
| 303 |
+
def pos2key2(p1, p2, *, k1, k2=100): return p1,p2,k1,k2
|
| 304 |
+
pos2key2(1, 2, k1=100)
|
| 305 |
+
pos2key2(1, 2, k1=100, k2=200)
|
| 306 |
+
pos2key2(1, 2, k2=100, k1=200)
|
| 307 |
+
def pos2key2dict(p1, p2, *, k1=100, k2, **kwarg): return p1,p2,k1,k2,kwarg
|
| 308 |
+
pos2key2dict(1,2,k2=100,tokwarg1=100,tokwarg2=200)
|
| 309 |
+
pos2key2dict(1,2,tokwarg1=100,tokwarg2=200, k2=100)
|
| 310 |
+
|
| 311 |
+
# keyword arguments after *arglist
|
| 312 |
+
def f(*args, **kwargs):
|
| 313 |
+
return args, kwargs
|
| 314 |
+
self.assertEquals(f(1, x=2, *[3, 4], y=5), ((1, 3, 4),
|
| 315 |
+
{'x':2, 'y':5}))
|
| 316 |
+
self.assertRaises(SyntaxError, eval, "f(1, *(2,3), 4)")
|
| 317 |
+
self.assertRaises(SyntaxError, eval, "f(1, x=2, *(3,4), x=5)")
|
| 318 |
+
|
| 319 |
+
# argument annotation tests
|
| 320 |
+
def f(x) -> list: pass
|
| 321 |
+
self.assertEquals(f.__annotations__, {'return': list})
|
| 322 |
+
def f(x:int): pass
|
| 323 |
+
self.assertEquals(f.__annotations__, {'x': int})
|
| 324 |
+
def f(*x:str): pass
|
| 325 |
+
self.assertEquals(f.__annotations__, {'x': str})
|
| 326 |
+
def f(**x:float): pass
|
| 327 |
+
self.assertEquals(f.__annotations__, {'x': float})
|
| 328 |
+
def f(x, y:1+2): pass
|
| 329 |
+
self.assertEquals(f.__annotations__, {'y': 3})
|
| 330 |
+
def f(a, b:1, c:2, d): pass
|
| 331 |
+
self.assertEquals(f.__annotations__, {'b': 1, 'c': 2})
|
| 332 |
+
def f(a, b:1, c:2, d, e:3=4, f=5, *g:6): pass
|
| 333 |
+
self.assertEquals(f.__annotations__,
|
| 334 |
+
{'b': 1, 'c': 2, 'e': 3, 'g': 6})
|
| 335 |
+
def f(a, b:1, c:2, d, e:3=4, f=5, *g:6, h:7, i=8, j:9=10,
|
| 336 |
+
**k:11) -> 12: pass
|
| 337 |
+
self.assertEquals(f.__annotations__,
|
| 338 |
+
{'b': 1, 'c': 2, 'e': 3, 'g': 6, 'h': 7, 'j': 9,
|
| 339 |
+
'k': 11, 'return': 12})
|
| 340 |
+
# Check for SF Bug #1697248 - mixing decorators and a return annotation
|
| 341 |
+
def null(x): return x
|
| 342 |
+
@null
|
| 343 |
+
def f(x) -> list: pass
|
| 344 |
+
self.assertEquals(f.__annotations__, {'return': list})
|
| 345 |
+
|
| 346 |
+
# test closures with a variety of oparg's
|
| 347 |
+
closure = 1
|
| 348 |
+
def f(): return closure
|
| 349 |
+
def f(x=1): return closure
|
| 350 |
+
def f(*, k=1): return closure
|
| 351 |
+
def f() -> int: return closure
|
| 352 |
+
|
| 353 |
+
# Check ast errors in *args and *kwargs
|
| 354 |
+
check_syntax_error(self, "f(*g(1=2))")
|
| 355 |
+
check_syntax_error(self, "f(**g(1=2))")
|
| 356 |
+
|
| 357 |
+
def testLambdef(self):
|
| 358 |
+
### lambdef: 'lambda' [varargslist] ':' test
|
| 359 |
+
l1 = lambda : 0
|
| 360 |
+
self.assertEquals(l1(), 0)
|
| 361 |
+
l2 = lambda : a[d] # XXX just testing the expression
|
| 362 |
+
l3 = lambda : [2 < x for x in [-1, 3, 0]]
|
| 363 |
+
self.assertEquals(l3(), [0, 1, 0])
|
| 364 |
+
l4 = lambda x = lambda y = lambda z=1 : z : y() : x()
|
| 365 |
+
self.assertEquals(l4(), 1)
|
| 366 |
+
l5 = lambda x, y, z=2: x + y + z
|
| 367 |
+
self.assertEquals(l5(1, 2), 5)
|
| 368 |
+
self.assertEquals(l5(1, 2, 3), 6)
|
| 369 |
+
check_syntax_error(self, "lambda x: x = 2")
|
| 370 |
+
check_syntax_error(self, "lambda (None,): None")
|
| 371 |
+
l6 = lambda x, y, *, k=20: x+y+k
|
| 372 |
+
self.assertEquals(l6(1,2), 1+2+20)
|
| 373 |
+
self.assertEquals(l6(1,2,k=10), 1+2+10)
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
### stmt: simple_stmt | compound_stmt
|
| 377 |
+
# Tested below
|
| 378 |
+
|
| 379 |
+
def testSimpleStmt(self):
|
| 380 |
+
### simple_stmt: small_stmt (';' small_stmt)* [';']
|
| 381 |
+
x = 1; pass; del x
|
| 382 |
+
def foo():
|
| 383 |
+
# verify statements that end with semi-colons
|
| 384 |
+
x = 1; pass; del x;
|
| 385 |
+
foo()
|
| 386 |
+
|
| 387 |
+
### small_stmt: expr_stmt | pass_stmt | del_stmt | flow_stmt | import_stmt | global_stmt | access_stmt
|
| 388 |
+
# Tested below
|
| 389 |
+
|
| 390 |
+
def testExprStmt(self):
|
| 391 |
+
# (exprlist '=')* exprlist
|
| 392 |
+
1
|
| 393 |
+
1, 2, 3
|
| 394 |
+
x = 1
|
| 395 |
+
x = 1, 2, 3
|
| 396 |
+
x = y = z = 1, 2, 3
|
| 397 |
+
x, y, z = 1, 2, 3
|
| 398 |
+
abc = a, b, c = x, y, z = xyz = 1, 2, (3, 4)
|
| 399 |
+
|
| 400 |
+
check_syntax_error(self, "x + 1 = 1")
|
| 401 |
+
check_syntax_error(self, "a + 1 = b + 2")
|
| 402 |
+
|
| 403 |
+
def testDelStmt(self):
|
| 404 |
+
# 'del' exprlist
|
| 405 |
+
abc = [1,2,3]
|
| 406 |
+
x, y, z = abc
|
| 407 |
+
xyz = x, y, z
|
| 408 |
+
|
| 409 |
+
del abc
|
| 410 |
+
del x, y, (z, xyz)
|
| 411 |
+
|
| 412 |
+
def testPassStmt(self):
|
| 413 |
+
# 'pass'
|
| 414 |
+
pass
|
| 415 |
+
|
| 416 |
+
# flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt
|
| 417 |
+
# Tested below
|
| 418 |
+
|
| 419 |
+
def testBreakStmt(self):
|
| 420 |
+
# 'break'
|
| 421 |
+
while 1: break
|
| 422 |
+
|
| 423 |
+
def testContinueStmt(self):
|
| 424 |
+
# 'continue'
|
| 425 |
+
i = 1
|
| 426 |
+
while i: i = 0; continue
|
| 427 |
+
|
| 428 |
+
msg = ""
|
| 429 |
+
while not msg:
|
| 430 |
+
msg = "ok"
|
| 431 |
+
try:
|
| 432 |
+
continue
|
| 433 |
+
msg = "continue failed to continue inside try"
|
| 434 |
+
except:
|
| 435 |
+
msg = "continue inside try called except block"
|
| 436 |
+
if msg != "ok":
|
| 437 |
+
self.fail(msg)
|
| 438 |
+
|
| 439 |
+
msg = ""
|
| 440 |
+
while not msg:
|
| 441 |
+
msg = "finally block not called"
|
| 442 |
+
try:
|
| 443 |
+
continue
|
| 444 |
+
finally:
|
| 445 |
+
msg = "ok"
|
| 446 |
+
if msg != "ok":
|
| 447 |
+
self.fail(msg)
|
| 448 |
+
|
| 449 |
+
def test_break_continue_loop(self):
|
| 450 |
+
# This test warrants an explanation. It is a test specifically for SF bugs
|
| 451 |
+
# #463359 and #462937. The bug is that a 'break' statement executed or
|
| 452 |
+
# exception raised inside a try/except inside a loop, *after* a continue
|
| 453 |
+
# statement has been executed in that loop, will cause the wrong number of
|
| 454 |
+
# arguments to be popped off the stack and the instruction pointer reset to
|
| 455 |
+
# a very small number (usually 0.) Because of this, the following test
|
| 456 |
+
# *must* written as a function, and the tracking vars *must* be function
|
| 457 |
+
# arguments with default values. Otherwise, the test will loop and loop.
|
| 458 |
+
|
| 459 |
+
def test_inner(extra_burning_oil = 1, count=0):
|
| 460 |
+
big_hippo = 2
|
| 461 |
+
while big_hippo:
|
| 462 |
+
count += 1
|
| 463 |
+
try:
|
| 464 |
+
if extra_burning_oil and big_hippo == 1:
|
| 465 |
+
extra_burning_oil -= 1
|
| 466 |
+
break
|
| 467 |
+
big_hippo -= 1
|
| 468 |
+
continue
|
| 469 |
+
except:
|
| 470 |
+
raise
|
| 471 |
+
if count > 2 or big_hippo != 1:
|
| 472 |
+
self.fail("continue then break in try/except in loop broken!")
|
| 473 |
+
test_inner()
|
| 474 |
+
|
| 475 |
+
def testReturn(self):
|
| 476 |
+
# 'return' [testlist_star_expr]
|
| 477 |
+
def g1(): return
|
| 478 |
+
def g2(): return 1
|
| 479 |
+
return_list = [2, 3]
|
| 480 |
+
def g3(): return 1, *return_list
|
| 481 |
+
g1()
|
| 482 |
+
x = g2()
|
| 483 |
+
x3 = g3()
|
| 484 |
+
check_syntax_error(self, "class foo:return 1")
|
| 485 |
+
|
| 486 |
+
def testYield(self):
|
| 487 |
+
# 'yield' [yield_arg]
|
| 488 |
+
def g1(): yield 1
|
| 489 |
+
yield_list = [2, 3]
|
| 490 |
+
def g2(): yield 1, *yield_list
|
| 491 |
+
def g3(): yield from iter(yield_list)
|
| 492 |
+
x1 = g1()
|
| 493 |
+
x2 = g2()
|
| 494 |
+
x3 = g3()
|
| 495 |
+
check_syntax_error(self, "class foo:yield 1")
|
| 496 |
+
check_syntax_error(self, "def g4(): yield from *a")
|
| 497 |
+
|
| 498 |
+
def testRaise(self):
|
| 499 |
+
# 'raise' test [',' test]
|
| 500 |
+
try: raise RuntimeError('just testing')
|
| 501 |
+
except RuntimeError: pass
|
| 502 |
+
try: raise KeyboardInterrupt
|
| 503 |
+
except KeyboardInterrupt: pass
|
| 504 |
+
|
| 505 |
+
def testImport(self):
|
| 506 |
+
# 'import' dotted_as_names
|
| 507 |
+
import sys
|
| 508 |
+
import time, sys
|
| 509 |
+
# 'from' dotted_name 'import' ('*' | '(' import_as_names ')' | import_as_names)
|
| 510 |
+
from time import time
|
| 511 |
+
from time import (time)
|
| 512 |
+
# not testable inside a function, but already done at top of the module
|
| 513 |
+
# from sys import *
|
| 514 |
+
from sys import path, argv
|
| 515 |
+
from sys import (path, argv)
|
| 516 |
+
from sys import (path, argv,)
|
| 517 |
+
|
| 518 |
+
def testGlobal(self):
|
| 519 |
+
# 'global' NAME (',' NAME)*
|
| 520 |
+
global a
|
| 521 |
+
global a, b
|
| 522 |
+
global one, two, three, four, five, six, seven, eight, nine, ten
|
| 523 |
+
|
| 524 |
+
def testNonlocal(self):
|
| 525 |
+
# 'nonlocal' NAME (',' NAME)*
|
| 526 |
+
x = 0
|
| 527 |
+
y = 0
|
| 528 |
+
def f():
|
| 529 |
+
nonlocal x
|
| 530 |
+
nonlocal x, y
|
| 531 |
+
|
| 532 |
+
def testAssert(self):
|
| 533 |
+
# assert_stmt: 'assert' test [',' test]
|
| 534 |
+
assert 1
|
| 535 |
+
assert 1, 1
|
| 536 |
+
assert lambda x:x
|
| 537 |
+
assert 1, lambda x:x+1
|
| 538 |
+
try:
|
| 539 |
+
assert 0, "msg"
|
| 540 |
+
except AssertionError as e:
|
| 541 |
+
self.assertEquals(e.args[0], "msg")
|
| 542 |
+
else:
|
| 543 |
+
if __debug__:
|
| 544 |
+
self.fail("AssertionError not raised by assert 0")
|
| 545 |
+
|
| 546 |
+
### compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
|
| 547 |
+
# Tested below
|
| 548 |
+
|
| 549 |
+
def testIf(self):
|
| 550 |
+
# 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
|
| 551 |
+
if 1: pass
|
| 552 |
+
if 1: pass
|
| 553 |
+
else: pass
|
| 554 |
+
if 0: pass
|
| 555 |
+
elif 0: pass
|
| 556 |
+
if 0: pass
|
| 557 |
+
elif 0: pass
|
| 558 |
+
elif 0: pass
|
| 559 |
+
elif 0: pass
|
| 560 |
+
else: pass
|
| 561 |
+
|
| 562 |
+
def testWhile(self):
|
| 563 |
+
# 'while' test ':' suite ['else' ':' suite]
|
| 564 |
+
while 0: pass
|
| 565 |
+
while 0: pass
|
| 566 |
+
else: pass
|
| 567 |
+
|
| 568 |
+
# Issue1920: "while 0" is optimized away,
|
| 569 |
+
# ensure that the "else" clause is still present.
|
| 570 |
+
x = 0
|
| 571 |
+
while 0:
|
| 572 |
+
x = 1
|
| 573 |
+
else:
|
| 574 |
+
x = 2
|
| 575 |
+
self.assertEquals(x, 2)
|
| 576 |
+
|
| 577 |
+
def testFor(self):
|
| 578 |
+
# 'for' exprlist 'in' exprlist ':' suite ['else' ':' suite]
|
| 579 |
+
for i in 1, 2, 3: pass
|
| 580 |
+
for i, j, k in (): pass
|
| 581 |
+
else: pass
|
| 582 |
+
class Squares:
|
| 583 |
+
def __init__(self, max):
|
| 584 |
+
self.max = max
|
| 585 |
+
self.sofar = []
|
| 586 |
+
def __len__(self): return len(self.sofar)
|
| 587 |
+
def __getitem__(self, i):
|
| 588 |
+
if not 0 <= i < self.max: raise IndexError
|
| 589 |
+
n = len(self.sofar)
|
| 590 |
+
while n <= i:
|
| 591 |
+
self.sofar.append(n*n)
|
| 592 |
+
n = n+1
|
| 593 |
+
return self.sofar[i]
|
| 594 |
+
n = 0
|
| 595 |
+
for x in Squares(10): n = n+x
|
| 596 |
+
if n != 285:
|
| 597 |
+
self.fail('for over growing sequence')
|
| 598 |
+
|
| 599 |
+
result = []
|
| 600 |
+
for x, in [(1,), (2,), (3,)]:
|
| 601 |
+
result.append(x)
|
| 602 |
+
self.assertEqual(result, [1, 2, 3])
|
| 603 |
+
|
| 604 |
+
def testTry(self):
|
| 605 |
+
### try_stmt: 'try' ':' suite (except_clause ':' suite)+ ['else' ':' suite]
|
| 606 |
+
### | 'try' ':' suite 'finally' ':' suite
|
| 607 |
+
### except_clause: 'except' [expr ['as' expr]]
|
| 608 |
+
try:
|
| 609 |
+
1/0
|
| 610 |
+
except ZeroDivisionError:
|
| 611 |
+
pass
|
| 612 |
+
else:
|
| 613 |
+
pass
|
| 614 |
+
try: 1/0
|
| 615 |
+
except EOFError: pass
|
| 616 |
+
except TypeError as msg: pass
|
| 617 |
+
except RuntimeError as msg: pass
|
| 618 |
+
except: pass
|
| 619 |
+
else: pass
|
| 620 |
+
try: 1/0
|
| 621 |
+
except (EOFError, TypeError, ZeroDivisionError): pass
|
| 622 |
+
try: 1/0
|
| 623 |
+
except (EOFError, TypeError, ZeroDivisionError) as msg: pass
|
| 624 |
+
try: pass
|
| 625 |
+
finally: pass
|
| 626 |
+
|
| 627 |
+
def testSuite(self):
|
| 628 |
+
# simple_stmt | NEWLINE INDENT NEWLINE* (stmt NEWLINE*)+ DEDENT
|
| 629 |
+
if 1: pass
|
| 630 |
+
if 1:
|
| 631 |
+
pass
|
| 632 |
+
if 1:
|
| 633 |
+
#
|
| 634 |
+
#
|
| 635 |
+
#
|
| 636 |
+
pass
|
| 637 |
+
pass
|
| 638 |
+
#
|
| 639 |
+
pass
|
| 640 |
+
#
|
| 641 |
+
|
| 642 |
+
def testTest(self):
|
| 643 |
+
### and_test ('or' and_test)*
|
| 644 |
+
### and_test: not_test ('and' not_test)*
|
| 645 |
+
### not_test: 'not' not_test | comparison
|
| 646 |
+
if not 1: pass
|
| 647 |
+
if 1 and 1: pass
|
| 648 |
+
if 1 or 1: pass
|
| 649 |
+
if not not not 1: pass
|
| 650 |
+
if not 1 and 1 and 1: pass
|
| 651 |
+
if 1 and 1 or 1 and 1 and 1 or not 1 and 1: pass
|
| 652 |
+
|
| 653 |
+
def testComparison(self):
|
| 654 |
+
### comparison: expr (comp_op expr)*
|
| 655 |
+
### comp_op: '<'|'>'|'=='|'>='|'<='|'!='|'in'|'not' 'in'|'is'|'is' 'not'
|
| 656 |
+
if 1: pass
|
| 657 |
+
x = (1 == 1)
|
| 658 |
+
if 1 == 1: pass
|
| 659 |
+
if 1 != 1: pass
|
| 660 |
+
if 1 < 1: pass
|
| 661 |
+
if 1 > 1: pass
|
| 662 |
+
if 1 <= 1: pass
|
| 663 |
+
if 1 >= 1: pass
|
| 664 |
+
if 1 is 1: pass
|
| 665 |
+
if 1 is not 1: pass
|
| 666 |
+
if 1 in (): pass
|
| 667 |
+
if 1 not in (): pass
|
| 668 |
+
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass
|
| 669 |
+
|
| 670 |
+
def testBinaryMaskOps(self):
|
| 671 |
+
x = 1 & 1
|
| 672 |
+
x = 1 ^ 1
|
| 673 |
+
x = 1 | 1
|
| 674 |
+
|
| 675 |
+
def testShiftOps(self):
|
| 676 |
+
x = 1 << 1
|
| 677 |
+
x = 1 >> 1
|
| 678 |
+
x = 1 << 1 >> 1
|
| 679 |
+
|
| 680 |
+
def testAdditiveOps(self):
|
| 681 |
+
x = 1
|
| 682 |
+
x = 1 + 1
|
| 683 |
+
x = 1 - 1 - 1
|
| 684 |
+
x = 1 - 1 + 1 - 1 + 1
|
| 685 |
+
|
| 686 |
+
def testMultiplicativeOps(self):
|
| 687 |
+
x = 1 * 1
|
| 688 |
+
x = 1 / 1
|
| 689 |
+
x = 1 % 1
|
| 690 |
+
x = 1 / 1 * 1 % 1
|
| 691 |
+
|
| 692 |
+
def testUnaryOps(self):
|
| 693 |
+
x = +1
|
| 694 |
+
x = -1
|
| 695 |
+
x = ~1
|
| 696 |
+
x = ~1 ^ 1 & 1 | 1 & 1 ^ -1
|
| 697 |
+
x = -1*1/1 + 1*1 - ---1*1
|
| 698 |
+
|
| 699 |
+
def testSelectors(self):
|
| 700 |
+
### trailer: '(' [testlist] ')' | '[' subscript ']' | '.' NAME
|
| 701 |
+
### subscript: expr | [expr] ':' [expr]
|
| 702 |
+
|
| 703 |
+
import sys, time
|
| 704 |
+
c = sys.path[0]
|
| 705 |
+
x = time.time()
|
| 706 |
+
x = sys.modules['time'].time()
|
| 707 |
+
a = '01234'
|
| 708 |
+
c = a[0]
|
| 709 |
+
c = a[-1]
|
| 710 |
+
s = a[0:5]
|
| 711 |
+
s = a[:5]
|
| 712 |
+
s = a[0:]
|
| 713 |
+
s = a[:]
|
| 714 |
+
s = a[-5:]
|
| 715 |
+
s = a[:-1]
|
| 716 |
+
s = a[-4:-3]
|
| 717 |
+
# A rough test of SF bug 1333982. https://python.org/sf/1333982
|
| 718 |
+
# The testing here is fairly incomplete.
|
| 719 |
+
# Test cases should include: commas with 1 and 2 colons
|
| 720 |
+
d = {}
|
| 721 |
+
d[1] = 1
|
| 722 |
+
d[1,] = 2
|
| 723 |
+
d[1,2] = 3
|
| 724 |
+
d[1,2,3] = 4
|
| 725 |
+
L = list(d)
|
| 726 |
+
L.sort(key=lambda x: x if isinstance(x, tuple) else ())
|
| 727 |
+
self.assertEquals(str(L), '[1, (1,), (1, 2), (1, 2, 3)]')
|
| 728 |
+
|
| 729 |
+
def testAtoms(self):
|
| 730 |
+
### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictsetmaker] '}' | NAME | NUMBER | STRING
|
| 731 |
+
### dictsetmaker: (test ':' test (',' test ':' test)* [',']) | (test (',' test)* [','])
|
| 732 |
+
|
| 733 |
+
x = (1)
|
| 734 |
+
x = (1 or 2 or 3)
|
| 735 |
+
x = (1 or 2 or 3, 2, 3)
|
| 736 |
+
|
| 737 |
+
x = []
|
| 738 |
+
x = [1]
|
| 739 |
+
x = [1 or 2 or 3]
|
| 740 |
+
x = [1 or 2 or 3, 2, 3]
|
| 741 |
+
x = []
|
| 742 |
+
|
| 743 |
+
x = {}
|
| 744 |
+
x = {'one': 1}
|
| 745 |
+
x = {'one': 1,}
|
| 746 |
+
x = {'one' or 'two': 1 or 2}
|
| 747 |
+
x = {'one': 1, 'two': 2}
|
| 748 |
+
x = {'one': 1, 'two': 2,}
|
| 749 |
+
x = {'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6}
|
| 750 |
+
|
| 751 |
+
x = {'one'}
|
| 752 |
+
x = {'one', 1,}
|
| 753 |
+
x = {'one', 'two', 'three'}
|
| 754 |
+
x = {2, 3, 4,}
|
| 755 |
+
|
| 756 |
+
x = x
|
| 757 |
+
x = 'x'
|
| 758 |
+
x = 123
|
| 759 |
+
|
| 760 |
+
### exprlist: expr (',' expr)* [',']
|
| 761 |
+
### testlist: test (',' test)* [',']
|
| 762 |
+
# These have been exercised enough above
|
| 763 |
+
|
| 764 |
+
def testClassdef(self):
|
| 765 |
+
# 'class' NAME ['(' [testlist] ')'] ':' suite
|
| 766 |
+
class B: pass
|
| 767 |
+
class B2(): pass
|
| 768 |
+
class C1(B): pass
|
| 769 |
+
class C2(B): pass
|
| 770 |
+
class D(C1, C2, B): pass
|
| 771 |
+
class C:
|
| 772 |
+
def meth1(self): pass
|
| 773 |
+
def meth2(self, arg): pass
|
| 774 |
+
def meth3(self, a1, a2): pass
|
| 775 |
+
|
| 776 |
+
# decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
|
| 777 |
+
# decorators: decorator+
|
| 778 |
+
# decorated: decorators (classdef | funcdef)
|
| 779 |
+
def class_decorator(x): return x
|
| 780 |
+
@class_decorator
|
| 781 |
+
class G: pass
|
| 782 |
+
|
| 783 |
+
def testDictcomps(self):
|
| 784 |
+
# dictorsetmaker: ( (test ':' test (comp_for |
|
| 785 |
+
# (',' test ':' test)* [','])) |
|
| 786 |
+
# (test (comp_for | (',' test)* [','])) )
|
| 787 |
+
nums = [1, 2, 3]
|
| 788 |
+
self.assertEqual({i:i+1 for i in nums}, {1: 2, 2: 3, 3: 4})
|
| 789 |
+
|
| 790 |
+
def testListcomps(self):
|
| 791 |
+
# list comprehension tests
|
| 792 |
+
nums = [1, 2, 3, 4, 5]
|
| 793 |
+
strs = ["Apple", "Banana", "Coconut"]
|
| 794 |
+
spcs = [" Apple", " Banana ", "Coco nut "]
|
| 795 |
+
|
| 796 |
+
self.assertEqual([s.strip() for s in spcs], ['Apple', 'Banana', 'Coco nut'])
|
| 797 |
+
self.assertEqual([3 * x for x in nums], [3, 6, 9, 12, 15])
|
| 798 |
+
self.assertEqual([x for x in nums if x > 2], [3, 4, 5])
|
| 799 |
+
self.assertEqual([(i, s) for i in nums for s in strs],
|
| 800 |
+
[(1, 'Apple'), (1, 'Banana'), (1, 'Coconut'),
|
| 801 |
+
(2, 'Apple'), (2, 'Banana'), (2, 'Coconut'),
|
| 802 |
+
(3, 'Apple'), (3, 'Banana'), (3, 'Coconut'),
|
| 803 |
+
(4, 'Apple'), (4, 'Banana'), (4, 'Coconut'),
|
| 804 |
+
(5, 'Apple'), (5, 'Banana'), (5, 'Coconut')])
|
| 805 |
+
self.assertEqual([(i, s) for i in nums for s in [f for f in strs if "n" in f]],
|
| 806 |
+
[(1, 'Banana'), (1, 'Coconut'), (2, 'Banana'), (2, 'Coconut'),
|
| 807 |
+
(3, 'Banana'), (3, 'Coconut'), (4, 'Banana'), (4, 'Coconut'),
|
| 808 |
+
(5, 'Banana'), (5, 'Coconut')])
|
| 809 |
+
self.assertEqual([(lambda a:[a**i for i in range(a+1)])(j) for j in range(5)],
|
| 810 |
+
[[1], [1, 1], [1, 2, 4], [1, 3, 9, 27], [1, 4, 16, 64, 256]])
|
| 811 |
+
|
| 812 |
+
def test_in_func(l):
|
| 813 |
+
return [0 < x < 3 for x in l if x > 2]
|
| 814 |
+
|
| 815 |
+
self.assertEqual(test_in_func(nums), [False, False, False])
|
| 816 |
+
|
| 817 |
+
def test_nested_front():
|
| 818 |
+
self.assertEqual([[y for y in [x, x + 1]] for x in [1,3,5]],
|
| 819 |
+
[[1, 2], [3, 4], [5, 6]])
|
| 820 |
+
|
| 821 |
+
test_nested_front()
|
| 822 |
+
|
| 823 |
+
check_syntax_error(self, "[i, s for i in nums for s in strs]")
|
| 824 |
+
check_syntax_error(self, "[x if y]")
|
| 825 |
+
|
| 826 |
+
suppliers = [
|
| 827 |
+
(1, "Boeing"),
|
| 828 |
+
(2, "Ford"),
|
| 829 |
+
(3, "Macdonalds")
|
| 830 |
+
]
|
| 831 |
+
|
| 832 |
+
parts = [
|
| 833 |
+
(10, "Airliner"),
|
| 834 |
+
(20, "Engine"),
|
| 835 |
+
(30, "Cheeseburger")
|
| 836 |
+
]
|
| 837 |
+
|
| 838 |
+
suppart = [
|
| 839 |
+
(1, 10), (1, 20), (2, 20), (3, 30)
|
| 840 |
+
]
|
| 841 |
+
|
| 842 |
+
x = [
|
| 843 |
+
(sname, pname)
|
| 844 |
+
for (sno, sname) in suppliers
|
| 845 |
+
for (pno, pname) in parts
|
| 846 |
+
for (sp_sno, sp_pno) in suppart
|
| 847 |
+
if sno == sp_sno and pno == sp_pno
|
| 848 |
+
]
|
| 849 |
+
|
| 850 |
+
self.assertEqual(x, [('Boeing', 'Airliner'), ('Boeing', 'Engine'), ('Ford', 'Engine'),
|
| 851 |
+
('Macdonalds', 'Cheeseburger')])
|
| 852 |
+
|
| 853 |
+
def testGenexps(self):
|
| 854 |
+
# generator expression tests
|
| 855 |
+
g = ([x for x in range(10)] for x in range(1))
|
| 856 |
+
self.assertEqual(next(g), [x for x in range(10)])
|
| 857 |
+
try:
|
| 858 |
+
next(g)
|
| 859 |
+
self.fail('should produce StopIteration exception')
|
| 860 |
+
except StopIteration:
|
| 861 |
+
pass
|
| 862 |
+
|
| 863 |
+
a = 1
|
| 864 |
+
try:
|
| 865 |
+
g = (a for d in a)
|
| 866 |
+
next(g)
|
| 867 |
+
self.fail('should produce TypeError')
|
| 868 |
+
except TypeError:
|
| 869 |
+
pass
|
| 870 |
+
|
| 871 |
+
self.assertEqual(list((x, y) for x in 'abcd' for y in 'abcd'), [(x, y) for x in 'abcd' for y in 'abcd'])
|
| 872 |
+
self.assertEqual(list((x, y) for x in 'ab' for y in 'xy'), [(x, y) for x in 'ab' for y in 'xy'])
|
| 873 |
+
|
| 874 |
+
a = [x for x in range(10)]
|
| 875 |
+
b = (x for x in (y for y in a))
|
| 876 |
+
self.assertEqual(sum(b), sum([x for x in range(10)]))
|
| 877 |
+
|
| 878 |
+
self.assertEqual(sum(x**2 for x in range(10)), sum([x**2 for x in range(10)]))
|
| 879 |
+
self.assertEqual(sum(x*x for x in range(10) if x%2), sum([x*x for x in range(10) if x%2]))
|
| 880 |
+
self.assertEqual(sum(x for x in (y for y in range(10))), sum([x for x in range(10)]))
|
| 881 |
+
self.assertEqual(sum(x for x in (y for y in (z for z in range(10)))), sum([x for x in range(10)]))
|
| 882 |
+
self.assertEqual(sum(x for x in [y for y in (z for z in range(10))]), sum([x for x in range(10)]))
|
| 883 |
+
self.assertEqual(sum(x for x in (y for y in (z for z in range(10) if True)) if True), sum([x for x in range(10)]))
|
| 884 |
+
self.assertEqual(sum(x for x in (y for y in (z for z in range(10) if True) if False) if True), 0)
|
| 885 |
+
check_syntax_error(self, "foo(x for x in range(10), 100)")
|
| 886 |
+
check_syntax_error(self, "foo(100, x for x in range(10))")
|
| 887 |
+
|
| 888 |
+
def testComprehensionSpecials(self):
|
| 889 |
+
# test for outmost iterable precomputation
|
| 890 |
+
x = 10; g = (i for i in range(x)); x = 5
|
| 891 |
+
self.assertEqual(len(list(g)), 10)
|
| 892 |
+
|
| 893 |
+
# This should hold, since we're only precomputing outmost iterable.
|
| 894 |
+
x = 10; t = False; g = ((i,j) for i in range(x) if t for j in range(x))
|
| 895 |
+
x = 5; t = True;
|
| 896 |
+
self.assertEqual([(i,j) for i in range(10) for j in range(5)], list(g))
|
| 897 |
+
|
| 898 |
+
# Grammar allows multiple adjacent 'if's in listcomps and genexps,
|
| 899 |
+
# even though it's silly. Make sure it works (ifelse broke this.)
|
| 900 |
+
self.assertEqual([ x for x in range(10) if x % 2 if x % 3 ], [1, 5, 7])
|
| 901 |
+
self.assertEqual(list(x for x in range(10) if x % 2 if x % 3), [1, 5, 7])
|
| 902 |
+
|
| 903 |
+
# verify unpacking single element tuples in listcomp/genexp.
|
| 904 |
+
self.assertEqual([x for x, in [(4,), (5,), (6,)]], [4, 5, 6])
|
| 905 |
+
self.assertEqual(list(x for x, in [(7,), (8,), (9,)]), [7, 8, 9])
|
| 906 |
+
|
| 907 |
+
def test_with_statement(self):
|
| 908 |
+
class manager(object):
|
| 909 |
+
def __enter__(self):
|
| 910 |
+
return (1, 2)
|
| 911 |
+
def __exit__(self, *args):
|
| 912 |
+
pass
|
| 913 |
+
|
| 914 |
+
with manager():
|
| 915 |
+
pass
|
| 916 |
+
with manager() as x:
|
| 917 |
+
pass
|
| 918 |
+
with manager() as (x, y):
|
| 919 |
+
pass
|
| 920 |
+
with manager(), manager():
|
| 921 |
+
pass
|
| 922 |
+
with manager() as x, manager() as y:
|
| 923 |
+
pass
|
| 924 |
+
with manager() as x, manager():
|
| 925 |
+
pass
|
| 926 |
+
|
| 927 |
+
def testIfElseExpr(self):
|
| 928 |
+
# Test ifelse expressions in various cases
|
| 929 |
+
def _checkeval(msg, ret):
|
| 930 |
+
"helper to check that evaluation of expressions is done correctly"
|
| 931 |
+
print(x)
|
| 932 |
+
return ret
|
| 933 |
+
|
| 934 |
+
# the next line is not allowed anymore
|
| 935 |
+
#self.assertEqual([ x() for x in lambda: True, lambda: False if x() ], [True])
|
| 936 |
+
self.assertEqual([ x() for x in (lambda: True, lambda: False) if x() ], [True])
|
| 937 |
+
self.assertEqual([ x(False) for x in (lambda x: False if x else True, lambda x: True if x else False) if x(False) ], [True])
|
| 938 |
+
self.assertEqual((5 if 1 else _checkeval("check 1", 0)), 5)
|
| 939 |
+
self.assertEqual((_checkeval("check 2", 0) if 0 else 5), 5)
|
| 940 |
+
self.assertEqual((5 and 6 if 0 else 1), 1)
|
| 941 |
+
self.assertEqual(((5 and 6) if 0 else 1), 1)
|
| 942 |
+
self.assertEqual((5 and (6 if 1 else 1)), 6)
|
| 943 |
+
self.assertEqual((0 or _checkeval("check 3", 2) if 0 else 3), 3)
|
| 944 |
+
self.assertEqual((1 or _checkeval("check 4", 2) if 1 else _checkeval("check 5", 3)), 1)
|
| 945 |
+
self.assertEqual((0 or 5 if 1 else _checkeval("check 6", 3)), 5)
|
| 946 |
+
self.assertEqual((not 5 if 1 else 1), False)
|
| 947 |
+
self.assertEqual((not 5 if 0 else 1), 1)
|
| 948 |
+
self.assertEqual((6 + 1 if 1 else 2), 7)
|
| 949 |
+
self.assertEqual((6 - 1 if 1 else 2), 5)
|
| 950 |
+
self.assertEqual((6 * 2 if 1 else 4), 12)
|
| 951 |
+
self.assertEqual((6 / 2 if 1 else 3), 3)
|
| 952 |
+
self.assertEqual((6 < 4 if 0 else 2), 2)
|
| 953 |
+
|
| 954 |
+
|
| 955 |
+
if __name__ == '__main__':
|
| 956 |
+
unittest.main()
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_autocast_to_full_precision_compositeimplicitautograd_dispatch.h
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace compositeimplicitautograd {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor _autocast_to_full_precision(const at::Tensor & self, bool cuda_enabled, bool cpu_enabled);
|
| 21 |
+
|
| 22 |
+
} // namespace compositeimplicitautograd
|
| 23 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_embedding_bag_sparse_backward.h
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/_embedding_bag_sparse_backward_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::_embedding_bag_sparse_backward(Tensor grad, Tensor indices, Tensor offsets, Tensor offset2bag, Tensor bag_size, SymInt num_weights, bool scale_grad_by_freq, int mode, Tensor? per_sample_weights, int padding_idx=-1) -> Tensor
|
| 26 |
+
inline at::Tensor _embedding_bag_sparse_backward(const at::Tensor & grad, const at::Tensor & indices, const at::Tensor & offsets, const at::Tensor & offset2bag, const at::Tensor & bag_size, int64_t num_weights, bool scale_grad_by_freq, int64_t mode, const ::std::optional<at::Tensor> & per_sample_weights, int64_t padding_idx=-1) {
|
| 27 |
+
return at::_ops::_embedding_bag_sparse_backward::call(grad, indices, offsets, offset2bag, bag_size, num_weights, scale_grad_by_freq, mode, per_sample_weights, padding_idx);
|
| 28 |
+
}
|
| 29 |
+
namespace symint {
|
| 30 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 31 |
+
at::Tensor _embedding_bag_sparse_backward(const at::Tensor & grad, const at::Tensor & indices, const at::Tensor & offsets, const at::Tensor & offset2bag, const at::Tensor & bag_size, int64_t num_weights, bool scale_grad_by_freq, int64_t mode, const ::std::optional<at::Tensor> & per_sample_weights, int64_t padding_idx=-1) {
|
| 32 |
+
return at::_ops::_embedding_bag_sparse_backward::call(grad, indices, offsets, offset2bag, bag_size, num_weights, scale_grad_by_freq, mode, per_sample_weights, padding_idx);
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
// aten::_embedding_bag_sparse_backward(Tensor grad, Tensor indices, Tensor offsets, Tensor offset2bag, Tensor bag_size, SymInt num_weights, bool scale_grad_by_freq, int mode, Tensor? per_sample_weights, int padding_idx=-1) -> Tensor
|
| 37 |
+
inline at::Tensor _embedding_bag_sparse_backward_symint(const at::Tensor & grad, const at::Tensor & indices, const at::Tensor & offsets, const at::Tensor & offset2bag, const at::Tensor & bag_size, c10::SymInt num_weights, bool scale_grad_by_freq, int64_t mode, const ::std::optional<at::Tensor> & per_sample_weights, int64_t padding_idx=-1) {
|
| 38 |
+
return at::_ops::_embedding_bag_sparse_backward::call(grad, indices, offsets, offset2bag, bag_size, num_weights, scale_grad_by_freq, mode, per_sample_weights, padding_idx);
|
| 39 |
+
}
|
| 40 |
+
namespace symint {
|
| 41 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 42 |
+
at::Tensor _embedding_bag_sparse_backward(const at::Tensor & grad, const at::Tensor & indices, const at::Tensor & offsets, const at::Tensor & offset2bag, const at::Tensor & bag_size, c10::SymInt num_weights, bool scale_grad_by_freq, int64_t mode, const ::std::optional<at::Tensor> & per_sample_weights, int64_t padding_idx=-1) {
|
| 43 |
+
return at::_ops::_embedding_bag_sparse_backward::call(grad, indices, offsets, offset2bag, bag_size, num_weights, scale_grad_by_freq, mode, per_sample_weights, padding_idx);
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_fft_r2c_cuda_dispatch.h
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace cuda {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor _fft_r2c(const at::Tensor & self, at::IntArrayRef dim, int64_t normalization, bool onesided);
|
| 21 |
+
TORCH_API at::Tensor & _fft_r2c_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef dim, int64_t normalization, bool onesided);
|
| 22 |
+
TORCH_API at::Tensor & _fft_r2c_outf(const at::Tensor & self, at::IntArrayRef dim, int64_t normalization, bool onesided, at::Tensor & out);
|
| 23 |
+
|
| 24 |
+
} // namespace cuda
|
| 25 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_addcdiv_native.h
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from NativeFunction.h
|
| 4 |
+
|
| 5 |
+
#include <c10/core/Scalar.h>
|
| 6 |
+
#include <c10/core/Storage.h>
|
| 7 |
+
#include <c10/core/TensorOptions.h>
|
| 8 |
+
#include <c10/util/Deprecated.h>
|
| 9 |
+
#include <c10/util/Optional.h>
|
| 10 |
+
#include <c10/core/QScheme.h>
|
| 11 |
+
#include <ATen/core/Reduction.h>
|
| 12 |
+
#include <ATen/core/Tensor.h>
|
| 13 |
+
#include <tuple>
|
| 14 |
+
#include <vector>
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
TORCH_API ::std::vector<at::Tensor> foreach_tensor_addcdiv_scalar_slow(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value=1);
|
| 20 |
+
TORCH_API void _foreach_addcdiv_Scalar_out(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value, at::TensorList out);
|
| 21 |
+
TORCH_API void foreach_tensor_addcdiv_scalar_slow_(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value=1);
|
| 22 |
+
TORCH_API ::std::vector<at::Tensor> foreach_tensor_addcdiv_scalar_cuda(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value=1);
|
| 23 |
+
TORCH_API void foreach_tensor_addcdiv_scalar_cuda_(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Scalar & value=1);
|
| 24 |
+
TORCH_API ::std::vector<at::Tensor> foreach_tensor_addcdiv_scalarlist_slow(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars);
|
| 25 |
+
TORCH_API void _foreach_addcdiv_ScalarList_out(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars, at::TensorList out);
|
| 26 |
+
TORCH_API void foreach_tensor_addcdiv_scalarlist_slow_(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars);
|
| 27 |
+
TORCH_API ::std::vector<at::Tensor> foreach_tensor_addcdiv_scalarlist_cuda(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars);
|
| 28 |
+
TORCH_API void foreach_tensor_addcdiv_scalarlist_cuda_(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, at::ArrayRef<at::Scalar> scalars);
|
| 29 |
+
TORCH_API ::std::vector<at::Tensor> foreach_tensor_addcdiv_tensor_slow(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars);
|
| 30 |
+
TORCH_API void _foreach_addcdiv_Tensor_out(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars, at::TensorList out);
|
| 31 |
+
TORCH_API void foreach_tensor_addcdiv_tensor_slow_(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars);
|
| 32 |
+
TORCH_API ::std::vector<at::Tensor> foreach_tensor_addcdiv_tensor_cuda(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars);
|
| 33 |
+
TORCH_API void foreach_tensor_addcdiv_tensor_cuda_(at::TensorList self, at::TensorList tensor1, at::TensorList tensor2, const at::Tensor & scalars);
|
| 34 |
+
} // namespace native
|
| 35 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_atan_ops.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Operator.h
|
| 4 |
+
|
| 5 |
+
#include <tuple>
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 9 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 10 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 11 |
+
#include <ATen/core/ATen_fwd.h>
|
| 12 |
+
|
| 13 |
+
namespace at {
|
| 14 |
+
namespace _ops {
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
struct TORCH_API _foreach_atan {
|
| 18 |
+
using schema = ::std::vector<at::Tensor> (at::TensorList);
|
| 19 |
+
using ptr_schema = schema*;
|
| 20 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 21 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_foreach_atan")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_atan(Tensor[] self) -> Tensor[]")
|
| 24 |
+
static ::std::vector<at::Tensor> call(at::TensorList self);
|
| 25 |
+
static ::std::vector<at::Tensor> redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API _foreach_atan_ {
|
| 29 |
+
using schema = void (at::TensorList);
|
| 30 |
+
using ptr_schema = schema*;
|
| 31 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 32 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_foreach_atan_")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_atan_(Tensor(a!)[] self) -> ()")
|
| 35 |
+
static void call(at::TensorList self);
|
| 36 |
+
static void redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
struct TORCH_API _foreach_atan_out {
|
| 40 |
+
using schema = void (at::TensorList, at::TensorList);
|
| 41 |
+
using ptr_schema = schema*;
|
| 42 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 43 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_foreach_atan")
|
| 44 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
|
| 45 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_foreach_atan.out(Tensor[] self, *, Tensor(a!)[] out) -> ()")
|
| 46 |
+
static void call(at::TensorList self, at::TensorList out);
|
| 47 |
+
static void redispatch(c10::DispatchKeySet dispatchKeySet, at::TensorList self, at::TensorList out);
|
| 48 |
+
};
|
| 49 |
+
|
| 50 |
+
}} // namespace at::_ops
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_log2_cuda_dispatch.h
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace cuda {
|
| 19 |
+
|
| 20 |
+
TORCH_API ::std::vector<at::Tensor> _foreach_log2(at::TensorList self);
|
| 21 |
+
TORCH_API void _foreach_log2_(at::TensorList self);
|
| 22 |
+
|
| 23 |
+
} // namespace cuda
|
| 24 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_sign_cuda_dispatch.h
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace cuda {
|
| 19 |
+
|
| 20 |
+
TORCH_API ::std::vector<at::Tensor> _foreach_sign(at::TensorList self);
|
| 21 |
+
TORCH_API void _foreach_sign_(at::TensorList self);
|
| 22 |
+
|
| 23 |
+
} // namespace cuda
|
| 24 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_fused_adam_cpu_dispatch.h
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace cpu {
|
| 19 |
+
|
| 20 |
+
TORCH_API void _fused_adam_(at::TensorList self, at::TensorList grads, at::TensorList exp_avgs, at::TensorList exp_avg_sqs, at::TensorList max_exp_avg_sqs, at::TensorList state_steps, double lr, double beta1, double beta2, double weight_decay, double eps, bool amsgrad, bool maximize, const ::std::optional<at::Tensor> & grad_scale={}, const ::std::optional<at::Tensor> & found_inf={});
|
| 21 |
+
TORCH_API void _fused_adam_(at::TensorList self, at::TensorList grads, at::TensorList exp_avgs, at::TensorList exp_avg_sqs, at::TensorList max_exp_avg_sqs, at::TensorList state_steps, const at::Tensor & lr, double beta1, double beta2, double weight_decay, double eps, bool amsgrad, bool maximize, const ::std::optional<at::Tensor> & grad_scale={}, const ::std::optional<at::Tensor> & found_inf={});
|
| 22 |
+
|
| 23 |
+
} // namespace cpu
|
| 24 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_linalg_solve_ex_meta_dispatch.h
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace meta {
|
| 19 |
+
|
| 20 |
+
TORCH_API ::std::tuple<at::Tensor,at::Tensor,at::Tensor,at::Tensor> _linalg_solve_ex(const at::Tensor & A, const at::Tensor & B, bool left=true, bool check_errors=false);
|
| 21 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &,at::Tensor &> _linalg_solve_ex_out(at::Tensor & result, at::Tensor & LU, at::Tensor & pivots, at::Tensor & info, const at::Tensor & A, const at::Tensor & B, bool left=true, bool check_errors=false);
|
| 22 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &,at::Tensor &> _linalg_solve_ex_outf(const at::Tensor & A, const at::Tensor & B, bool left, bool check_errors, at::Tensor & result, at::Tensor & LU, at::Tensor & pivots, at::Tensor & info);
|
| 23 |
+
|
| 24 |
+
} // namespace meta
|
| 25 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_get_ragged_idx.h
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/_nested_get_ragged_idx_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::_nested_get_ragged_idx(Tensor self) -> int
|
| 26 |
+
inline int64_t _nested_get_ragged_idx(const at::Tensor & self) {
|
| 27 |
+
return at::_ops::_nested_get_ragged_idx::call(self);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_tensor_storage_offsets_native.h
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from NativeFunction.h
|
| 4 |
+
|
| 5 |
+
#include <c10/core/Scalar.h>
|
| 6 |
+
#include <c10/core/Storage.h>
|
| 7 |
+
#include <c10/core/TensorOptions.h>
|
| 8 |
+
#include <c10/util/Deprecated.h>
|
| 9 |
+
#include <c10/util/Optional.h>
|
| 10 |
+
#include <c10/core/QScheme.h>
|
| 11 |
+
#include <ATen/core/Reduction.h>
|
| 12 |
+
#include <ATen/core/Tensor.h>
|
| 13 |
+
#include <tuple>
|
| 14 |
+
#include <vector>
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
TORCH_API at::Tensor & _nested_tensor_storage_offsets_out(const at::Tensor & self, at::Tensor & out);
|
| 20 |
+
TORCH_API at::Tensor _nested_tensor_storage_offsets(const at::Tensor & self);
|
| 21 |
+
} // namespace native
|
| 22 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/_shape_as_tensor_ops.h
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Operator.h
|
| 4 |
+
|
| 5 |
+
#include <tuple>
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 9 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 10 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 11 |
+
#include <ATen/core/ATen_fwd.h>
|
| 12 |
+
|
| 13 |
+
namespace at {
|
| 14 |
+
namespace _ops {
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
struct TORCH_API _shape_as_tensor {
|
| 18 |
+
using schema = at::Tensor (const at::Tensor &);
|
| 19 |
+
using ptr_schema = schema*;
|
| 20 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 21 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_shape_as_tensor")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_shape_as_tensor(Tensor self) -> Tensor")
|
| 24 |
+
static at::Tensor call(const at::Tensor & self);
|
| 25 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
}} // namespace at::_ops
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/addbmm_meta_dispatch.h
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace meta {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor & addbmm_(at::Tensor & self, const at::Tensor & batch1, const at::Tensor & batch2, const at::Scalar & beta=1, const at::Scalar & alpha=1);
|
| 21 |
+
|
| 22 |
+
} // namespace meta
|
| 23 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/addcdiv.h
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/addcdiv_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::addcdiv.out(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1, Tensor(a!) out) -> Tensor(a!)
|
| 26 |
+
inline at::Tensor & addcdiv_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & tensor1, const at::Tensor & tensor2, const at::Scalar & value=1) {
|
| 27 |
+
return at::_ops::addcdiv_out::call(self, tensor1, tensor2, value, out);
|
| 28 |
+
}
|
| 29 |
+
// aten::addcdiv.out(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1, Tensor(a!) out) -> Tensor(a!)
|
| 30 |
+
inline at::Tensor & addcdiv_outf(const at::Tensor & self, const at::Tensor & tensor1, const at::Tensor & tensor2, const at::Scalar & value, at::Tensor & out) {
|
| 31 |
+
return at::_ops::addcdiv_out::call(self, tensor1, tensor2, value, out);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
// aten::addcdiv(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor
|
| 35 |
+
inline at::Tensor addcdiv(const at::Tensor & self, const at::Tensor & tensor1, const at::Tensor & tensor2, const at::Scalar & value=1) {
|
| 36 |
+
return at::_ops::addcdiv::call(self, tensor1, tensor2, value);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/alpha_dropout.h
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/alpha_dropout_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::alpha_dropout(Tensor input, float p, bool train) -> Tensor
|
| 26 |
+
inline at::Tensor alpha_dropout(const at::Tensor & input, double p, bool train) {
|
| 27 |
+
return at::_ops::alpha_dropout::call(input, p, train);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
// aten::alpha_dropout_(Tensor(a!) self, float p, bool train) -> Tensor(a!)
|
| 31 |
+
inline at::Tensor & alpha_dropout_(at::Tensor & self, double p, bool train) {
|
| 32 |
+
return at::_ops::alpha_dropout_::call(self, p, train);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/argwhere.h
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/argwhere_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::argwhere(Tensor self) -> Tensor
|
| 26 |
+
inline at::Tensor argwhere(const at::Tensor & self) {
|
| 27 |
+
return at::_ops::argwhere::call(self);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/avg_pool2d_backward_ops.h
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Operator.h
|
| 4 |
+
|
| 5 |
+
#include <tuple>
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 9 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 10 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 11 |
+
#include <ATen/core/ATen_fwd.h>
|
| 12 |
+
|
| 13 |
+
namespace at {
|
| 14 |
+
namespace _ops {
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
struct TORCH_API avg_pool2d_backward_grad_input {
|
| 18 |
+
using schema = at::Tensor & (const at::Tensor &, const at::Tensor &, at::IntArrayRef, at::IntArrayRef, at::IntArrayRef, bool, bool, ::std::optional<int64_t>, at::Tensor &);
|
| 19 |
+
using ptr_schema = schema*;
|
| 20 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 21 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::avg_pool2d_backward")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "grad_input")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "avg_pool2d_backward.grad_input(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, bool ceil_mode, bool count_include_pad, int? divisor_override, *, Tensor(a!) grad_input) -> Tensor(a!)")
|
| 24 |
+
static at::Tensor & call(const at::Tensor & grad_output, const at::Tensor & self, at::IntArrayRef kernel_size, at::IntArrayRef stride, at::IntArrayRef padding, bool ceil_mode, bool count_include_pad, ::std::optional<int64_t> divisor_override, at::Tensor & grad_input);
|
| 25 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & grad_output, const at::Tensor & self, at::IntArrayRef kernel_size, at::IntArrayRef stride, at::IntArrayRef padding, bool ceil_mode, bool count_include_pad, ::std::optional<int64_t> divisor_override, at::Tensor & grad_input);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API avg_pool2d_backward {
|
| 29 |
+
using schema = at::Tensor (const at::Tensor &, const at::Tensor &, at::IntArrayRef, at::IntArrayRef, at::IntArrayRef, bool, bool, ::std::optional<int64_t>);
|
| 30 |
+
using ptr_schema = schema*;
|
| 31 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 32 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::avg_pool2d_backward")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "avg_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, bool ceil_mode, bool count_include_pad, int? divisor_override) -> Tensor")
|
| 35 |
+
static at::Tensor call(const at::Tensor & grad_output, const at::Tensor & self, at::IntArrayRef kernel_size, at::IntArrayRef stride, at::IntArrayRef padding, bool ceil_mode, bool count_include_pad, ::std::optional<int64_t> divisor_override);
|
| 36 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & grad_output, const at::Tensor & self, at::IntArrayRef kernel_size, at::IntArrayRef stride, at::IntArrayRef padding, bool ceil_mode, bool count_include_pad, ::std::optional<int64_t> divisor_override);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
}} // namespace at::_ops
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/baddbmm.h
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/baddbmm_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::baddbmm(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor
|
| 26 |
+
inline at::Tensor baddbmm(const at::Tensor & self, const at::Tensor & batch1, const at::Tensor & batch2, const at::Scalar & beta=1, const at::Scalar & alpha=1) {
|
| 27 |
+
return at::_ops::baddbmm::call(self, batch1, batch2, beta, alpha);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
// aten::baddbmm.out(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!)
|
| 31 |
+
inline at::Tensor & baddbmm_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & batch1, const at::Tensor & batch2, const at::Scalar & beta=1, const at::Scalar & alpha=1) {
|
| 32 |
+
return at::_ops::baddbmm_out::call(self, batch1, batch2, beta, alpha, out);
|
| 33 |
+
}
|
| 34 |
+
// aten::baddbmm.out(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!)
|
| 35 |
+
inline at::Tensor & baddbmm_outf(const at::Tensor & self, const at::Tensor & batch1, const at::Tensor & batch2, const at::Scalar & beta, const at::Scalar & alpha, at::Tensor & out) {
|
| 36 |
+
return at::_ops::baddbmm_out::call(self, batch1, batch2, beta, alpha, out);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/batch_norm_backward_elemt_cuda_dispatch.h
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace cuda {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor batch_norm_backward_elemt(const at::Tensor & grad_out, const at::Tensor & input, const at::Tensor & mean, const at::Tensor & invstd, const ::std::optional<at::Tensor> & weight, const at::Tensor & sum_dy, const at::Tensor & sum_dy_xmu, const at::Tensor & count);
|
| 21 |
+
|
| 22 |
+
} // namespace cuda
|
| 23 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/celu_compositeexplicitautograd_dispatch.h
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace compositeexplicitautograd {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor celu(const at::Tensor & self, const at::Scalar & alpha=1.0);
|
| 21 |
+
TORCH_API at::Tensor & celu_out(at::Tensor & out, const at::Tensor & self, const at::Scalar & alpha=1.0);
|
| 22 |
+
TORCH_API at::Tensor & celu_outf(const at::Tensor & self, const at::Scalar & alpha, at::Tensor & out);
|
| 23 |
+
TORCH_API at::Tensor & celu_(at::Tensor & self, const at::Scalar & alpha=1.0);
|
| 24 |
+
|
| 25 |
+
} // namespace compositeexplicitautograd
|
| 26 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/cholesky_inverse_ops.h
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Operator.h
|
| 4 |
+
|
| 5 |
+
#include <tuple>
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 9 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 10 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 11 |
+
#include <ATen/core/ATen_fwd.h>
|
| 12 |
+
|
| 13 |
+
namespace at {
|
| 14 |
+
namespace _ops {
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
struct TORCH_API cholesky_inverse {
|
| 18 |
+
using schema = at::Tensor (const at::Tensor &, bool);
|
| 19 |
+
using ptr_schema = schema*;
|
| 20 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 21 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::cholesky_inverse")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "cholesky_inverse(Tensor self, bool upper=False) -> Tensor")
|
| 24 |
+
static at::Tensor call(const at::Tensor & self, bool upper);
|
| 25 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, bool upper);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API cholesky_inverse_out {
|
| 29 |
+
using schema = at::Tensor & (const at::Tensor &, bool, at::Tensor &);
|
| 30 |
+
using ptr_schema = schema*;
|
| 31 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 32 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::cholesky_inverse")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "cholesky_inverse.out(Tensor self, bool upper=False, *, Tensor(a!) out) -> Tensor(a!)")
|
| 35 |
+
static at::Tensor & call(const at::Tensor & self, bool upper, at::Tensor & out);
|
| 36 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, bool upper, at::Tensor & out);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
}} // namespace at::_ops
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/cudnn_affine_grid_generator_backward_native.h
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from NativeFunction.h
|
| 4 |
+
|
| 5 |
+
#include <c10/core/Scalar.h>
|
| 6 |
+
#include <c10/core/Storage.h>
|
| 7 |
+
#include <c10/core/TensorOptions.h>
|
| 8 |
+
#include <c10/util/Deprecated.h>
|
| 9 |
+
#include <c10/util/Optional.h>
|
| 10 |
+
#include <c10/core/QScheme.h>
|
| 11 |
+
#include <ATen/core/Reduction.h>
|
| 12 |
+
#include <ATen/core/Tensor.h>
|
| 13 |
+
#include <tuple>
|
| 14 |
+
#include <vector>
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
TORCH_API at::Tensor & cudnn_affine_grid_generator_backward_out(const at::Tensor & grad, int64_t N, int64_t C, int64_t H, int64_t W, at::Tensor & out);
|
| 20 |
+
TORCH_API at::Tensor cudnn_affine_grid_generator_backward(const at::Tensor & grad, int64_t N, int64_t C, int64_t H, int64_t W);
|
| 21 |
+
} // namespace native
|
| 22 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/cudnn_convolution_relu.h
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/cudnn_convolution_relu_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::cudnn_convolution_relu(Tensor self, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups) -> Tensor
|
| 26 |
+
inline at::Tensor cudnn_convolution_relu(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, at::IntArrayRef stride, at::IntArrayRef padding, at::IntArrayRef dilation, int64_t groups) {
|
| 27 |
+
return at::_ops::cudnn_convolution_relu::call(self, weight, bias, c10::fromIntArrayRefSlow(stride), c10::fromIntArrayRefSlow(padding), c10::fromIntArrayRefSlow(dilation), groups);
|
| 28 |
+
}
|
| 29 |
+
namespace symint {
|
| 30 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 31 |
+
at::Tensor cudnn_convolution_relu(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, at::IntArrayRef stride, at::IntArrayRef padding, at::IntArrayRef dilation, int64_t groups) {
|
| 32 |
+
return at::_ops::cudnn_convolution_relu::call(self, weight, bias, c10::fromIntArrayRefSlow(stride), c10::fromIntArrayRefSlow(padding), c10::fromIntArrayRefSlow(dilation), groups);
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
// aten::cudnn_convolution_relu(Tensor self, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups) -> Tensor
|
| 37 |
+
inline at::Tensor cudnn_convolution_relu_symint(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, c10::SymIntArrayRef dilation, c10::SymInt groups) {
|
| 38 |
+
return at::_ops::cudnn_convolution_relu::call(self, weight, bias, stride, padding, dilation, groups);
|
| 39 |
+
}
|
| 40 |
+
namespace symint {
|
| 41 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 42 |
+
at::Tensor cudnn_convolution_relu(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, c10::SymIntArrayRef dilation, c10::SymInt groups) {
|
| 43 |
+
return at::_ops::cudnn_convolution_relu::call(self, weight, bias, stride, padding, dilation, groups);
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
// aten::cudnn_convolution_relu.out(Tensor self, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups, *, Tensor(a!) out) -> Tensor(a!)
|
| 48 |
+
inline at::Tensor & cudnn_convolution_relu_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, at::IntArrayRef stride, at::IntArrayRef padding, at::IntArrayRef dilation, int64_t groups) {
|
| 49 |
+
return at::_ops::cudnn_convolution_relu_out::call(self, weight, bias, c10::fromIntArrayRefSlow(stride), c10::fromIntArrayRefSlow(padding), c10::fromIntArrayRefSlow(dilation), groups, out);
|
| 50 |
+
}
|
| 51 |
+
namespace symint {
|
| 52 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 53 |
+
at::Tensor & cudnn_convolution_relu_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, at::IntArrayRef stride, at::IntArrayRef padding, at::IntArrayRef dilation, int64_t groups) {
|
| 54 |
+
return at::_ops::cudnn_convolution_relu_out::call(self, weight, bias, c10::fromIntArrayRefSlow(stride), c10::fromIntArrayRefSlow(padding), c10::fromIntArrayRefSlow(dilation), groups, out);
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
// aten::cudnn_convolution_relu.out(Tensor self, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups, *, Tensor(a!) out) -> Tensor(a!)
|
| 59 |
+
inline at::Tensor & cudnn_convolution_relu_outf(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, at::IntArrayRef stride, at::IntArrayRef padding, at::IntArrayRef dilation, int64_t groups, at::Tensor & out) {
|
| 60 |
+
return at::_ops::cudnn_convolution_relu_out::call(self, weight, bias, c10::fromIntArrayRefSlow(stride), c10::fromIntArrayRefSlow(padding), c10::fromIntArrayRefSlow(dilation), groups, out);
|
| 61 |
+
}
|
| 62 |
+
namespace symint {
|
| 63 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 64 |
+
at::Tensor & cudnn_convolution_relu_outf(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, at::IntArrayRef stride, at::IntArrayRef padding, at::IntArrayRef dilation, int64_t groups, at::Tensor & out) {
|
| 65 |
+
return at::_ops::cudnn_convolution_relu_out::call(self, weight, bias, c10::fromIntArrayRefSlow(stride), c10::fromIntArrayRefSlow(padding), c10::fromIntArrayRefSlow(dilation), groups, out);
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
// aten::cudnn_convolution_relu.out(Tensor self, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups, *, Tensor(a!) out) -> Tensor(a!)
|
| 70 |
+
inline at::Tensor & cudnn_convolution_relu_symint_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, c10::SymIntArrayRef dilation, c10::SymInt groups) {
|
| 71 |
+
return at::_ops::cudnn_convolution_relu_out::call(self, weight, bias, stride, padding, dilation, groups, out);
|
| 72 |
+
}
|
| 73 |
+
namespace symint {
|
| 74 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 75 |
+
at::Tensor & cudnn_convolution_relu_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, c10::SymIntArrayRef dilation, c10::SymInt groups) {
|
| 76 |
+
return at::_ops::cudnn_convolution_relu_out::call(self, weight, bias, stride, padding, dilation, groups, out);
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
// aten::cudnn_convolution_relu.out(Tensor self, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups, *, Tensor(a!) out) -> Tensor(a!)
|
| 81 |
+
inline at::Tensor & cudnn_convolution_relu_symint_outf(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, c10::SymIntArrayRef dilation, c10::SymInt groups, at::Tensor & out) {
|
| 82 |
+
return at::_ops::cudnn_convolution_relu_out::call(self, weight, bias, stride, padding, dilation, groups, out);
|
| 83 |
+
}
|
| 84 |
+
namespace symint {
|
| 85 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 86 |
+
at::Tensor & cudnn_convolution_relu_outf(const at::Tensor & self, const at::Tensor & weight, const ::std::optional<at::Tensor> & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, c10::SymIntArrayRef dilation, c10::SymInt groups, at::Tensor & out) {
|
| 87 |
+
return at::_ops::cudnn_convolution_relu_out::call(self, weight, bias, stride, padding, dilation, groups, out);
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/cummin_native.h
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from NativeFunction.h
|
| 4 |
+
|
| 5 |
+
#include <c10/core/Scalar.h>
|
| 6 |
+
#include <c10/core/Storage.h>
|
| 7 |
+
#include <c10/core/TensorOptions.h>
|
| 8 |
+
#include <c10/util/Deprecated.h>
|
| 9 |
+
#include <c10/util/Optional.h>
|
| 10 |
+
#include <c10/core/QScheme.h>
|
| 11 |
+
#include <ATen/core/Reduction.h>
|
| 12 |
+
#include <ATen/core/Tensor.h>
|
| 13 |
+
#include <tuple>
|
| 14 |
+
#include <vector>
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
TORCH_API ::std::tuple<at::Tensor,at::Tensor> cummin(const at::Tensor & self, int64_t dim);
|
| 20 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &> cummin_out(const at::Tensor & self, int64_t dim, at::Tensor & values, at::Tensor & indices);
|
| 21 |
+
TORCH_API ::std::tuple<at::Tensor,at::Tensor> cummin(const at::Tensor & self, at::Dimname dim);
|
| 22 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &> cummin_out(const at::Tensor & self, at::Dimname dim, at::Tensor & values, at::Tensor & indices);
|
| 23 |
+
} // namespace native
|
| 24 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/diagonal_copy_native.h
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from NativeFunction.h
|
| 4 |
+
|
| 5 |
+
#include <c10/core/Scalar.h>
|
| 6 |
+
#include <c10/core/Storage.h>
|
| 7 |
+
#include <c10/core/TensorOptions.h>
|
| 8 |
+
#include <c10/util/Deprecated.h>
|
| 9 |
+
#include <c10/util/Optional.h>
|
| 10 |
+
#include <c10/core/QScheme.h>
|
| 11 |
+
#include <ATen/core/Reduction.h>
|
| 12 |
+
#include <ATen/core/Tensor.h>
|
| 13 |
+
#include <tuple>
|
| 14 |
+
#include <vector>
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
TORCH_API at::Tensor & diagonal_copy_out(const at::Tensor & self, int64_t offset, int64_t dim1, int64_t dim2, at::Tensor & out);
|
| 20 |
+
TORCH_API at::Tensor diagonal_copy(const at::Tensor & self, int64_t offset=0, int64_t dim1=0, int64_t dim2=1);
|
| 21 |
+
} // namespace native
|
| 22 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/embedding_backward.h
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/embedding_backward_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::embedding_backward(Tensor grad, Tensor indices, SymInt num_weights, SymInt padding_idx, bool scale_grad_by_freq, bool sparse) -> Tensor
|
| 26 |
+
inline at::Tensor embedding_backward(const at::Tensor & grad, const at::Tensor & indices, int64_t num_weights, int64_t padding_idx, bool scale_grad_by_freq, bool sparse) {
|
| 27 |
+
return at::_ops::embedding_backward::call(grad, indices, num_weights, padding_idx, scale_grad_by_freq, sparse);
|
| 28 |
+
}
|
| 29 |
+
namespace symint {
|
| 30 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
|
| 31 |
+
at::Tensor embedding_backward(const at::Tensor & grad, const at::Tensor & indices, int64_t num_weights, int64_t padding_idx, bool scale_grad_by_freq, bool sparse) {
|
| 32 |
+
return at::_ops::embedding_backward::call(grad, indices, num_weights, padding_idx, scale_grad_by_freq, sparse);
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
// aten::embedding_backward(Tensor grad, Tensor indices, SymInt num_weights, SymInt padding_idx, bool scale_grad_by_freq, bool sparse) -> Tensor
|
| 37 |
+
inline at::Tensor embedding_backward_symint(const at::Tensor & grad, const at::Tensor & indices, c10::SymInt num_weights, c10::SymInt padding_idx, bool scale_grad_by_freq, bool sparse) {
|
| 38 |
+
return at::_ops::embedding_backward::call(grad, indices, num_weights, padding_idx, scale_grad_by_freq, sparse);
|
| 39 |
+
}
|
| 40 |
+
namespace symint {
|
| 41 |
+
template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
|
| 42 |
+
at::Tensor embedding_backward(const at::Tensor & grad, const at::Tensor & indices, c10::SymInt num_weights, c10::SymInt padding_idx, bool scale_grad_by_freq, bool sparse) {
|
| 43 |
+
return at::_ops::embedding_backward::call(grad, indices, num_weights, padding_idx, scale_grad_by_freq, sparse);
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/expand_copy_compositeexplicitautograd_dispatch.h
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace compositeexplicitautograd {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor & expand_copy_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef size, bool implicit=false);
|
| 21 |
+
TORCH_API at::Tensor & expand_copy_outf(const at::Tensor & self, at::IntArrayRef size, bool implicit, at::Tensor & out);
|
| 22 |
+
TORCH_API at::Tensor & expand_copy_symint_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef size, bool implicit=false);
|
| 23 |
+
TORCH_API at::Tensor & expand_copy_symint_outf(const at::Tensor & self, c10::SymIntArrayRef size, bool implicit, at::Tensor & out);
|
| 24 |
+
|
| 25 |
+
} // namespace compositeexplicitautograd
|
| 26 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/from_file.h
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/from_file_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::from_file(str filename, bool? shared=None, int? size=0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
|
| 26 |
+
inline at::Tensor from_file(c10::string_view filename, ::std::optional<bool> shared=::std::nullopt, ::std::optional<int64_t> size=0, at::TensorOptions options={}) {
|
| 27 |
+
return at::_ops::from_file::call(filename, shared, size, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
|
| 28 |
+
}
|
| 29 |
+
// aten::from_file(str filename, bool? shared=None, int? size=0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
|
| 30 |
+
inline at::Tensor from_file(c10::string_view filename, ::std::optional<bool> shared, ::std::optional<int64_t> size, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
|
| 31 |
+
return at::_ops::from_file::call(filename, shared, size, dtype, layout, device, pin_memory);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
// aten::from_file.out(str filename, bool? shared=None, int? size=0, *, Tensor(a!) out) -> Tensor(a!)
|
| 35 |
+
inline at::Tensor & from_file_out(at::Tensor & out, c10::string_view filename, ::std::optional<bool> shared=::std::nullopt, ::std::optional<int64_t> size=0) {
|
| 36 |
+
return at::_ops::from_file_out::call(filename, shared, size, out);
|
| 37 |
+
}
|
| 38 |
+
// aten::from_file.out(str filename, bool? shared=None, int? size=0, *, Tensor(a!) out) -> Tensor(a!)
|
| 39 |
+
inline at::Tensor & from_file_outf(c10::string_view filename, ::std::optional<bool> shared, ::std::optional<int64_t> size, at::Tensor & out) {
|
| 40 |
+
return at::_ops::from_file_out::call(filename, shared, size, out);
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/glu_jvp.h
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Function.h
|
| 4 |
+
|
| 5 |
+
#include <ATen/Context.h>
|
| 6 |
+
#include <ATen/DeviceGuard.h>
|
| 7 |
+
#include <ATen/TensorUtils.h>
|
| 8 |
+
#include <ATen/TracerMode.h>
|
| 9 |
+
#include <ATen/core/Generator.h>
|
| 10 |
+
#include <ATen/core/Reduction.h>
|
| 11 |
+
#include <ATen/core/Tensor.h>
|
| 12 |
+
#include <c10/core/Scalar.h>
|
| 13 |
+
#include <c10/core/Storage.h>
|
| 14 |
+
#include <c10/core/TensorOptions.h>
|
| 15 |
+
#include <c10/util/Deprecated.h>
|
| 16 |
+
#include <c10/util/Optional.h>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#include <ATen/ops/glu_jvp_ops.h>
|
| 21 |
+
|
| 22 |
+
namespace at {
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
// aten::glu_jvp(Tensor glu, Tensor x, Tensor dx, int dim) -> Tensor
|
| 26 |
+
inline at::Tensor glu_jvp(const at::Tensor & glu, const at::Tensor & x, const at::Tensor & dx, int64_t dim) {
|
| 27 |
+
return at::_ops::glu_jvp::call(glu, x, dx, dim);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
// aten::glu_jvp.out(Tensor glu, Tensor x, Tensor dx, int dim, *, Tensor(a!) out) -> Tensor(a!)
|
| 31 |
+
inline at::Tensor & glu_jvp_out(at::Tensor & out, const at::Tensor & glu, const at::Tensor & x, const at::Tensor & dx, int64_t dim) {
|
| 32 |
+
return at::_ops::glu_jvp_out::call(glu, x, dx, dim, out);
|
| 33 |
+
}
|
| 34 |
+
// aten::glu_jvp.out(Tensor glu, Tensor x, Tensor dx, int dim, *, Tensor(a!) out) -> Tensor(a!)
|
| 35 |
+
inline at::Tensor & glu_jvp_outf(const at::Tensor & glu, const at::Tensor & x, const at::Tensor & dx, int64_t dim, at::Tensor & out) {
|
| 36 |
+
return at::_ops::glu_jvp_out::call(glu, x, dx, dim, out);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
}
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/grid_sampler_3d_backward_ops.h
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Operator.h
|
| 4 |
+
|
| 5 |
+
#include <tuple>
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 9 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 10 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 11 |
+
#include <ATen/core/ATen_fwd.h>
|
| 12 |
+
|
| 13 |
+
namespace at {
|
| 14 |
+
namespace _ops {
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
struct TORCH_API grid_sampler_3d_backward {
|
| 18 |
+
using schema = ::std::tuple<at::Tensor,at::Tensor> (const at::Tensor &, const at::Tensor &, const at::Tensor &, int64_t, int64_t, bool, ::std::array<bool,2>);
|
| 19 |
+
using ptr_schema = schema*;
|
| 20 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 21 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::grid_sampler_3d_backward")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "grid_sampler_3d_backward(Tensor grad_output, Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners, bool[2] output_mask) -> (Tensor, Tensor)")
|
| 24 |
+
static ::std::tuple<at::Tensor,at::Tensor> call(const at::Tensor & grad_output, const at::Tensor & input, const at::Tensor & grid, int64_t interpolation_mode, int64_t padding_mode, bool align_corners, ::std::array<bool,2> output_mask);
|
| 25 |
+
static ::std::tuple<at::Tensor,at::Tensor> redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & grad_output, const at::Tensor & input, const at::Tensor & grid, int64_t interpolation_mode, int64_t padding_mode, bool align_corners, ::std::array<bool,2> output_mask);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API grid_sampler_3d_backward_out {
|
| 29 |
+
using schema = ::std::tuple<at::Tensor &,at::Tensor &> (const at::Tensor &, const at::Tensor &, const at::Tensor &, int64_t, int64_t, bool, ::std::array<bool,2>, at::Tensor &, at::Tensor &);
|
| 30 |
+
using ptr_schema = schema*;
|
| 31 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 32 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::grid_sampler_3d_backward")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "grid_sampler_3d_backward.out(Tensor grad_output, Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners, bool[2] output_mask, *, Tensor(a!) out0, Tensor(b!) out1) -> (Tensor(a!), Tensor(b!))")
|
| 35 |
+
static ::std::tuple<at::Tensor &,at::Tensor &> call(const at::Tensor & grad_output, const at::Tensor & input, const at::Tensor & grid, int64_t interpolation_mode, int64_t padding_mode, bool align_corners, ::std::array<bool,2> output_mask, at::Tensor & out0, at::Tensor & out1);
|
| 36 |
+
static ::std::tuple<at::Tensor &,at::Tensor &> redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & grad_output, const at::Tensor & input, const at::Tensor & grid, int64_t interpolation_mode, int64_t padding_mode, bool align_corners, ::std::array<bool,2> output_mask, at::Tensor & out0, at::Tensor & out1);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
}} // namespace at::_ops
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/huber_loss_backward_native.h
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from NativeFunction.h
|
| 4 |
+
|
| 5 |
+
#include <c10/core/Scalar.h>
|
| 6 |
+
#include <c10/core/Storage.h>
|
| 7 |
+
#include <c10/core/TensorOptions.h>
|
| 8 |
+
#include <c10/util/Deprecated.h>
|
| 9 |
+
#include <c10/util/Optional.h>
|
| 10 |
+
#include <c10/core/QScheme.h>
|
| 11 |
+
#include <ATen/core/Reduction.h>
|
| 12 |
+
#include <ATen/core/Tensor.h>
|
| 13 |
+
#include <tuple>
|
| 14 |
+
#include <vector>
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
TORCH_API at::Tensor huber_loss_backward(const at::Tensor & grad_output, const at::Tensor & self, const at::Tensor & target, int64_t reduction, double delta);
|
| 20 |
+
TORCH_API at::Tensor & huber_loss_backward_out(const at::Tensor & grad_output, const at::Tensor & self, const at::Tensor & target, int64_t reduction, double delta, at::Tensor & grad_input);
|
| 21 |
+
} // namespace native
|
| 22 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/index_cuda_dispatch.h
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace cuda {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor index(const at::Tensor & self, const c10::List<::std::optional<at::Tensor>> & indices);
|
| 21 |
+
TORCH_API at::Tensor & index_out(at::Tensor & out, const at::Tensor & self, const c10::List<::std::optional<at::Tensor>> & indices);
|
| 22 |
+
TORCH_API at::Tensor & index_outf(const at::Tensor & self, const c10::List<::std::optional<at::Tensor>> & indices, at::Tensor & out);
|
| 23 |
+
|
| 24 |
+
} // namespace cuda
|
| 25 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/infinitely_differentiable_gelu_backward_compositeimplicitautograd_dispatch.h
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace compositeimplicitautograd {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor infinitely_differentiable_gelu_backward(const at::Tensor & grad, const at::Tensor & self);
|
| 21 |
+
|
| 22 |
+
} // namespace compositeimplicitautograd
|
| 23 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/inner_compositeimplicitautograd_dispatch.h
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace compositeimplicitautograd {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor inner(const at::Tensor & self, const at::Tensor & other);
|
| 21 |
+
TORCH_API at::Tensor & inner_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & other);
|
| 22 |
+
TORCH_API at::Tensor & inner_outf(const at::Tensor & self, const at::Tensor & other, at::Tensor & out);
|
| 23 |
+
|
| 24 |
+
} // namespace compositeimplicitautograd
|
| 25 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/leaky_relu_backward_meta_dispatch.h
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace meta {
|
| 19 |
+
|
| 20 |
+
TORCH_API at::Tensor leaky_relu_backward(const at::Tensor & grad_output, const at::Tensor & self, const at::Scalar & negative_slope, bool self_is_result);
|
| 21 |
+
TORCH_API at::Tensor & leaky_relu_backward_out(at::Tensor & grad_input, const at::Tensor & grad_output, const at::Tensor & self, const at::Scalar & negative_slope, bool self_is_result);
|
| 22 |
+
TORCH_API at::Tensor & leaky_relu_backward_outf(const at::Tensor & grad_output, const at::Tensor & self, const at::Scalar & negative_slope, bool self_is_result, at::Tensor & grad_input);
|
| 23 |
+
|
| 24 |
+
} // namespace meta
|
| 25 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/less_ops.h
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Operator.h
|
| 4 |
+
|
| 5 |
+
#include <tuple>
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 9 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 10 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 11 |
+
#include <ATen/core/ATen_fwd.h>
|
| 12 |
+
|
| 13 |
+
namespace at {
|
| 14 |
+
namespace _ops {
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
struct TORCH_API less_Scalar_out {
|
| 18 |
+
using schema = at::Tensor & (const at::Tensor &, const at::Scalar &, at::Tensor &);
|
| 19 |
+
using ptr_schema = schema*;
|
| 20 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 21 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Scalar_out")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)")
|
| 24 |
+
static at::Tensor & call(const at::Tensor & self, const at::Scalar & other, at::Tensor & out);
|
| 25 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Scalar & other, at::Tensor & out);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API less_Scalar {
|
| 29 |
+
using schema = at::Tensor (const at::Tensor &, const at::Scalar &);
|
| 30 |
+
using ptr_schema = schema*;
|
| 31 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 32 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Scalar")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less.Scalar(Tensor self, Scalar other) -> Tensor")
|
| 35 |
+
static at::Tensor call(const at::Tensor & self, const at::Scalar & other);
|
| 36 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Scalar & other);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
struct TORCH_API less_Tensor_out {
|
| 40 |
+
using schema = at::Tensor & (const at::Tensor &, const at::Tensor &, at::Tensor &);
|
| 41 |
+
using ptr_schema = schema*;
|
| 42 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 43 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less")
|
| 44 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Tensor_out")
|
| 45 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)")
|
| 46 |
+
static at::Tensor & call(const at::Tensor & self, const at::Tensor & other, at::Tensor & out);
|
| 47 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Tensor & other, at::Tensor & out);
|
| 48 |
+
};
|
| 49 |
+
|
| 50 |
+
struct TORCH_API less_Tensor {
|
| 51 |
+
using schema = at::Tensor (const at::Tensor &, const at::Tensor &);
|
| 52 |
+
using ptr_schema = schema*;
|
| 53 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 54 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less")
|
| 55 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Tensor")
|
| 56 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less.Tensor(Tensor self, Tensor other) -> Tensor")
|
| 57 |
+
static at::Tensor call(const at::Tensor & self, const at::Tensor & other);
|
| 58 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Tensor & other);
|
| 59 |
+
};
|
| 60 |
+
|
| 61 |
+
struct TORCH_API less__Scalar {
|
| 62 |
+
using schema = at::Tensor & (at::Tensor &, const at::Scalar &);
|
| 63 |
+
using ptr_schema = schema*;
|
| 64 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 65 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less_")
|
| 66 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Scalar")
|
| 67 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)")
|
| 68 |
+
static at::Tensor & call(at::Tensor & self, const at::Scalar & other);
|
| 69 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, at::Tensor & self, const at::Scalar & other);
|
| 70 |
+
};
|
| 71 |
+
|
| 72 |
+
struct TORCH_API less__Tensor {
|
| 73 |
+
using schema = at::Tensor & (at::Tensor &, const at::Tensor &);
|
| 74 |
+
using ptr_schema = schema*;
|
| 75 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 76 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::less_")
|
| 77 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "Tensor")
|
| 78 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "less_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)")
|
| 79 |
+
static at::Tensor & call(at::Tensor & self, const at::Tensor & other);
|
| 80 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, at::Tensor & self, const at::Tensor & other);
|
| 81 |
+
};
|
| 82 |
+
|
| 83 |
+
}} // namespace at::_ops
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_cond_native.h
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from NativeFunction.h
|
| 4 |
+
|
| 5 |
+
#include <c10/core/Scalar.h>
|
| 6 |
+
#include <c10/core/Storage.h>
|
| 7 |
+
#include <c10/core/TensorOptions.h>
|
| 8 |
+
#include <c10/util/Deprecated.h>
|
| 9 |
+
#include <c10/util/Optional.h>
|
| 10 |
+
#include <c10/core/QScheme.h>
|
| 11 |
+
#include <ATen/core/Reduction.h>
|
| 12 |
+
#include <ATen/core/Tensor.h>
|
| 13 |
+
#include <tuple>
|
| 14 |
+
#include <vector>
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
namespace at {
|
| 18 |
+
namespace native {
|
| 19 |
+
TORCH_API at::Tensor linalg_cond(const at::Tensor & self, const ::std::optional<at::Scalar> & p=::std::nullopt);
|
| 20 |
+
TORCH_API at::Tensor & linalg_cond_out(const at::Tensor & self, const ::std::optional<at::Scalar> & p, at::Tensor & out);
|
| 21 |
+
TORCH_API at::Tensor linalg_cond(const at::Tensor & self, c10::string_view p);
|
| 22 |
+
TORCH_API at::Tensor & linalg_cond_out(const at::Tensor & self, c10::string_view p, at::Tensor & out);
|
| 23 |
+
} // namespace native
|
| 24 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_cond_ops.h
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
|
| 3 |
+
// @generated by torchgen/gen.py from Operator.h
|
| 4 |
+
|
| 5 |
+
#include <tuple>
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 9 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 10 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 11 |
+
#include <ATen/core/ATen_fwd.h>
|
| 12 |
+
|
| 13 |
+
namespace at {
|
| 14 |
+
namespace _ops {
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
struct TORCH_API linalg_cond {
|
| 18 |
+
using schema = at::Tensor (const at::Tensor &, const ::std::optional<at::Scalar> &);
|
| 19 |
+
using ptr_schema = schema*;
|
| 20 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 21 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::linalg_cond")
|
| 22 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
|
| 23 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "linalg_cond(Tensor self, Scalar? p=None) -> Tensor")
|
| 24 |
+
static at::Tensor call(const at::Tensor & self, const ::std::optional<at::Scalar> & p);
|
| 25 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const ::std::optional<at::Scalar> & p);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
struct TORCH_API linalg_cond_out {
|
| 29 |
+
using schema = at::Tensor & (const at::Tensor &, const ::std::optional<at::Scalar> &, at::Tensor &);
|
| 30 |
+
using ptr_schema = schema*;
|
| 31 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 32 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::linalg_cond")
|
| 33 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
|
| 34 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "linalg_cond.out(Tensor self, Scalar? p=None, *, Tensor(a!) out) -> Tensor(a!)")
|
| 35 |
+
static at::Tensor & call(const at::Tensor & self, const ::std::optional<at::Scalar> & p, at::Tensor & out);
|
| 36 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const ::std::optional<at::Scalar> & p, at::Tensor & out);
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
struct TORCH_API linalg_cond_p_str {
|
| 40 |
+
using schema = at::Tensor (const at::Tensor &, c10::string_view);
|
| 41 |
+
using ptr_schema = schema*;
|
| 42 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 43 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::linalg_cond")
|
| 44 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "p_str")
|
| 45 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "linalg_cond.p_str(Tensor self, str p) -> Tensor")
|
| 46 |
+
static at::Tensor call(const at::Tensor & self, c10::string_view p);
|
| 47 |
+
static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, c10::string_view p);
|
| 48 |
+
};
|
| 49 |
+
|
| 50 |
+
struct TORCH_API linalg_cond_p_str_out {
|
| 51 |
+
using schema = at::Tensor & (const at::Tensor &, c10::string_view, at::Tensor &);
|
| 52 |
+
using ptr_schema = schema*;
|
| 53 |
+
// See Note [static constexpr char* members for windows NVCC]
|
| 54 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::linalg_cond")
|
| 55 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "p_str_out")
|
| 56 |
+
STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "linalg_cond.p_str_out(Tensor self, str p, *, Tensor(a!) out) -> Tensor(a!)")
|
| 57 |
+
static at::Tensor & call(const at::Tensor & self, c10::string_view p, at::Tensor & out);
|
| 58 |
+
static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, c10::string_view p, at::Tensor & out);
|
| 59 |
+
};
|
| 60 |
+
|
| 61 |
+
}} // namespace at::_ops
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_ldl_factor_compositeimplicitautograd_dispatch.h
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace compositeimplicitautograd {
|
| 19 |
+
|
| 20 |
+
TORCH_API ::std::tuple<at::Tensor,at::Tensor> linalg_ldl_factor(const at::Tensor & self, bool hermitian=false);
|
| 21 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &> linalg_ldl_factor_out(at::Tensor & LD, at::Tensor & pivots, const at::Tensor & self, bool hermitian=false);
|
| 22 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &> linalg_ldl_factor_outf(const at::Tensor & self, bool hermitian, at::Tensor & LD, at::Tensor & pivots);
|
| 23 |
+
|
| 24 |
+
} // namespace compositeimplicitautograd
|
| 25 |
+
} // namespace at
|
parrot/lib/python3.10/site-packages/torch/include/ATen/ops/linalg_lstsq_cuda_dispatch.h
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#pragma once
|
| 2 |
+
// @generated by torchgen/gen.py from DispatchKeyFunction.h
|
| 3 |
+
|
| 4 |
+
// NB: The implementing C++ file is RegisterDispatchKey.cpp
|
| 5 |
+
|
| 6 |
+
// The only #includes we need are for custom classes that have defaults in the C++ API
|
| 7 |
+
#include <c10/core/MemoryFormat.h>
|
| 8 |
+
#include <c10/core/Scalar.h>
|
| 9 |
+
#include <ATen/core/Reduction.h>
|
| 10 |
+
|
| 11 |
+
// Forward declarations of any types needed in the operator signatures.
|
| 12 |
+
// We can't directly include these classes because it will cause circular include dependencies.
|
| 13 |
+
// This file is included by TensorBody.h, which defines the Tensor class.
|
| 14 |
+
#include <ATen/core/ATen_fwd.h>
|
| 15 |
+
|
| 16 |
+
namespace at {
|
| 17 |
+
|
| 18 |
+
namespace cuda {
|
| 19 |
+
|
| 20 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &,at::Tensor &> linalg_lstsq_out(at::Tensor & solution, at::Tensor & residuals, at::Tensor & rank, at::Tensor & singular_values, const at::Tensor & self, const at::Tensor & b, ::std::optional<double> rcond=::std::nullopt, ::std::optional<c10::string_view> driver=::std::nullopt);
|
| 21 |
+
TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &,at::Tensor &> linalg_lstsq_outf(const at::Tensor & self, const at::Tensor & b, ::std::optional<double> rcond, ::std::optional<c10::string_view> driver, at::Tensor & solution, at::Tensor & residuals, at::Tensor & rank, at::Tensor & singular_values);
|
| 22 |
+
|
| 23 |
+
} // namespace cuda
|
| 24 |
+
} // namespace at
|