-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathlogical_operations.py
More file actions
93 lines (67 loc) · 2.53 KB
/
logical_operations.py
File metadata and controls
93 lines (67 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
from arrayfire_wrapper.defines import AFArray
from arrayfire_wrapper.lib._utility import binary_op, unary_op
def and_(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source:
"""
return binary_op("and", lhs, rhs)
def bitand(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/group__arith__func__bitand.htm#ga45c0779ade4703708596df11cca98800
"""
return binary_op(bitand.__name__, lhs, rhs)
def bitnot(arr: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/group__arith__func__bitnot.htm#gaf97e8a38aab59ed2d3a742515467d01e
"""
return unary_op(bitnot.__name__, arr)
def bitor(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/group__arith__func__bitor.htm#ga84c99f77d1d83fd53f949b4d67b5b210
"""
return binary_op(bitor.__name__, lhs, rhs)
def bitxor(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/group__arith__func__bitxor.htm#ga8188620da6b432998e55fdd1fad22100
"""
return binary_op(bitxor.__name__, lhs, rhs)
def eq(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/group__arith__func__eq.htm#ga76d2da7716831616bb81effa9e163693
"""
return binary_op(eq.__name__, lhs, rhs)
def ge(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/group__arith__func__ge.htm#ga4513f212e0b0a22dcf4653e89c85e3d9
"""
return binary_op(ge.__name__, lhs, rhs)
def gt(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/group__arith__func__gt.htm#ga4e65603259515de8939899a163ebaf9e
"""
return binary_op(gt.__name__, lhs, rhs)
def le(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/group__arith__func__le.htm#gad5535ce64dbed46d0773fd494e84e922
"""
return binary_op(le.__name__, lhs, rhs)
def lt(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/arith_8h.htm#ae7aa04bf23b32bb11c4bab8bdd637103
"""
return binary_op(lt.__name__, lhs, rhs)
def neq(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source: https://arrayfire.org/docs/group__arith__func__neq.htm#gae4ee8bd06a410f259f1493fb811ce441
"""
return binary_op(neq.__name__, lhs, rhs)
def not_(arr: AFArray, /) -> AFArray:
"""
source:
"""
return unary_op("not", arr)
def or_(lhs: AFArray, rhs: AFArray, /) -> AFArray:
"""
source:
"""
return binary_op("or", lhs, rhs)