blob: 644c6e7e3045321e023a02d33e5bcf60d42cfa34 (
plain)
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
|
(.require
[library
[lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
["%" \\format (.only format)]]]]]
[\\library
["[0]" /]])
(`` (def .public documentation
(List $.Documentation)
(list ($.module /._
"")
($.definition /.bits_per_byte)
($.definition /.bytes_per_i64)
($.definition /.width)
($.definition /.false)
($.definition /.true)
($.definition /.equivalence)
($.definition /.hash)
($.definition /.disjunction)
($.definition /.conjunction)
($.definition /.reversed)
($.definition /.left_rotated)
($.definition /.right_rotated)
(,, (with_template [<name> <doc>]
[($.definition <name>
<doc>)]
[/.or "Bitwise or."]
[/.xor "Bitwise xor."]
[/.and "Bitwise and."]
[/.left_shifted "Bitwise left-shift."]
[/.right_shifted "Unsigned/logic bitwise right-shift."]
))
($.definition /.Mask
"A pattern of bits that can be imposed on I64 values.")
($.definition /.bit
"A mask with only a specific bit set."
[(bit position)])
($.definition /.sign
"A mask for the sign bit of ints.")
($.definition /.not
"Bitwise negation.")
($.definition /.mask
"Mask a block of bits of the specified size."
[(mask amount_of_bits)])
($.definition /.ones
"Count the number of 1s in a bit-map."
[(ones it)])
(,, (with_template [<name> <doc>]
[($.definition <name>
<doc>)]
[/.zero "Clear bit at the given index."]
[/.one "Set bit at given index."]
[/.flipped "Flip bit at given index."]
))
($.definition /.one?
""
[(one? index input)])
($.definition /.zero?
""
[(zero? index input)])
($.definition /.region
"A mask for a block of bits of the given size, starting at the given offset."
[(region offset size)])
($.definition (/.Sub width)
"A sub-space of I64 with a reduce amount of bits.")
($.definition /.sub
"Given a width in the interval (0,64), yields an implementation for integers of that width."
[(sub width)])
)))
|