-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📝 Documentation for much of the new C APIs!
- Loading branch information
Showing
22 changed files
with
955 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.. ============================================================================= | ||
.. | ||
.. ztd.idk | ||
.. Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
.. Contact: opensource@soasis.org | ||
.. | ||
.. Commercial License Usage | ||
.. Licensees holding valid commercial ztd.idk licenses may use this file in | ||
.. accordance with the commercial license agreement provided with the | ||
.. Software or, alternatively, in accordance with the terms contained in | ||
.. a written agreement between you and Shepherd's Oasis, LLC. | ||
.. For licensing terms and conditions see your agreement. For | ||
.. further information contact opensource@soasis.org. | ||
.. | ||
.. Apache License Version 2 Usage | ||
.. Alternatively, this file may be used under the terms of Apache License | ||
.. Version 2.0 (the "License") for non-commercial use; you may not use this | ||
.. file except in compliance with the License. You may obtain a copy of the | ||
.. License at | ||
.. | ||
.. https://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
.. | ||
.. =============================================================================> | ||
Alignment | ||
========= | ||
|
||
This API is identical to the one defined in the C APIs, which can be :doc:`found here</c_api/alignment>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. ============================================================================= | ||
.. | ||
.. ztd.idk | ||
.. Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
.. Contact: opensource@soasis.org | ||
.. | ||
.. Commercial License Usage | ||
.. Licensees holding valid commercial ztd.idk licenses may use this file in | ||
.. accordance with the commercial license agreement provided with the | ||
.. Software or, alternatively, in accordance with the terms contained in | ||
.. a written agreement between you and Shepherd's Oasis, LLC. | ||
.. For licensing terms and conditions see your agreement. For | ||
.. further information contact opensource@soasis.org. | ||
.. | ||
.. Apache License Version 2 Usage | ||
.. Alternatively, this file may be used under the terms of Apache License | ||
.. Version 2.0 (the "License") for non-commercial use; you may not use this | ||
.. file except in compliance with the License. You may obtain a copy of the | ||
.. License at | ||
.. | ||
.. https://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
.. | ||
.. =============================================================================> | ||
Alignment | ||
========= | ||
|
||
These APIs aid in aligning pointers and types. They are typically available for both C and C++. | ||
|
||
.. doxygendefine:: ZTD_ASSUME_ALIGNED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
.. ============================================================================= | ||
.. | ||
.. ztd.idk | ||
.. Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
.. Contact: opensource@soasis.org | ||
.. | ||
.. Commercial License Usage | ||
.. Licensees holding valid commercial ztd.idk licenses may use this file in | ||
.. accordance with the commercial license agreement provided with the | ||
.. Software or, alternatively, in accordance with the terms contained in | ||
.. a written agreement between you and Shepherd's Oasis, LLC. | ||
.. For licensing terms and conditions see your agreement. For | ||
.. further information contact opensource@soasis.org. | ||
.. | ||
.. Apache License Version 2 Usage | ||
.. Alternatively, this file may be used under the terms of Apache License | ||
.. Version 2.0 (the "License") for non-commercial use; you may not use this | ||
.. file except in compliance with the License. You may obtain a copy of the | ||
.. License at | ||
.. | ||
.. https://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
.. | ||
.. =============================================================================> | ||
Bit Intrinsics | ||
============== | ||
|
||
Bit intrinsics are functions that map as closely as possible to behavior and functionality in ISAs without needing to deal with the undefined behavior and non-portability of said architectures. It provides vital functionality that can greatly speed up work on specific kinds of bit operations. The provided intrinsics here are a large subset of the most efficient operations, offered in various flavors for ease-of-use. | ||
|
||
"Leading" refers to the most significant bit in a given value. This is the "left side" of an integer when writing source code, such that ``0b10`` has a most significant bit of ``1``. "Trailing" refers to the least significant bit in a given value. This is the "left side" of an integer when writing source code, such that ``0b10`` has a least significant bit of ``0``. | ||
|
||
.. doxygendefine:: ztdc_count_ones | ||
|
||
.. doxygendefine:: ztdc_count_zeros | ||
|
||
.. doxygendefine:: ztdc_count_leading_zeros | ||
|
||
.. doxygendefine:: ztdc_count_trailing_zeros | ||
|
||
.. doxygendefine:: ztdc_count_leading_ones | ||
|
||
.. doxygendefine:: ztdc_count_trailing_ones | ||
|
||
.. doxygendefine:: ztdc_first_leading_zero | ||
|
||
.. doxygendefine:: ztdc_first_trailing_zero | ||
|
||
.. doxygendefine:: ztdc_first_leading_one | ||
|
||
.. doxygendefine:: ztdc_first_trailing_one | ||
|
||
.. doxygendefine:: ztdc_rotate_left | ||
|
||
.. doxygendefine:: ztdc_rotate_right | ||
|
||
.. doxygendefine:: ztdc_has_single_bit | ||
|
||
.. doxygendefine:: ztdc_bit_width | ||
|
||
.. doxygendefine:: ztdc_bit_ceil | ||
|
||
.. doxygendefine:: ztdc_bit_floor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. ============================================================================= | ||
.. | ||
.. ztd.idk | ||
.. Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
.. Contact: opensource@soasis.org | ||
.. | ||
.. Commercial License Usage | ||
.. Licensees holding valid commercial ztd.idk licenses may use this file in | ||
.. accordance with the commercial license agreement provided with the | ||
.. Software or, alternatively, in accordance with the terms contained in | ||
.. a written agreement between you and Shepherd's Oasis, LLC. | ||
.. For licensing terms and conditions see your agreement. For | ||
.. further information contact opensource@soasis.org. | ||
.. | ||
.. Apache License Version 2 Usage | ||
.. Alternatively, this file may be used under the terms of Apache License | ||
.. Version 2.0 (the "License") for non-commercial use; you may not use this | ||
.. file except in compliance with the License. You may obtain a copy of the | ||
.. License at | ||
.. | ||
.. https://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
.. | ||
.. =============================================================================> | ||
8-bit Memory Reverse | ||
==================== | ||
|
||
.. doxygenfunction:: ztdc_memreverse8 | ||
|
||
.. doxygenfunction:: ztdc_memreverse8uN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
.. ============================================================================= | ||
.. | ||
.. ztd.idk | ||
.. Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
.. Contact: opensource@soasis.org | ||
.. | ||
.. Commercial License Usage | ||
.. Licensees holding valid commercial ztd.idk licenses may use this file in | ||
.. accordance with the commercial license agreement provided with the | ||
.. Software or, alternatively, in accordance with the terms contained in | ||
.. a written agreement between you and Shepherd's Oasis, LLC. | ||
.. For licensing terms and conditions see your agreement. For | ||
.. further information contact opensource@soasis.org. | ||
.. | ||
.. Apache License Version 2 Usage | ||
.. Alternatively, this file may be used under the terms of Apache License | ||
.. Version 2.0 (the "License") for non-commercial use; you may not use this | ||
.. file except in compliance with the License. You may obtain a copy of the | ||
.. License at | ||
.. | ||
.. https://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
.. | ||
.. =============================================================================> | ||
8-bit Endian Load/Store | ||
======================= | ||
|
||
|
||
Unsigned Variants | ||
----------------- | ||
|
||
.. doxygenfunction:: ztdc_store8_leuN | ||
.. doxygenfunction:: ztdc_store8_beuN | ||
.. doxygenfunction:: ztdc_load8_leuN | ||
.. doxygenfunction:: ztdc_load8_beuN | ||
.. doxygenfunction:: ztdc_store8_aligned_leuN | ||
.. doxygenfunction:: ztdc_store8_aligned_beuN | ||
.. doxygenfunction:: ztdc_load8_aligned_leuN | ||
.. doxygenfunction:: ztdc_load8_aligned_beuN | ||
|
||
Signed Variants | ||
--------------- | ||
|
||
.. doxygenfunction:: ztdc_store8_lesN | ||
.. doxygenfunction:: ztdc_store8_besN | ||
.. doxygenfunction:: ztdc_load8_lesN | ||
.. doxygenfunction:: ztdc_load8_besN | ||
.. doxygenfunction:: ztdc_store8_aligned_lesN | ||
.. doxygenfunction:: ztdc_store8_aligned_besN | ||
.. doxygenfunction:: ztdc_load8_aligned_lesN | ||
.. doxygenfunction:: ztdc_load8_aligned_besN | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. ============================================================================= | ||
.. | ||
.. ztd.idk | ||
.. Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
.. Contact: opensource@soasis.org | ||
.. | ||
.. Commercial License Usage | ||
.. Licensees holding valid commercial ztd.idk licenses may use this file in | ||
.. accordance with the commercial license agreement provided with the | ||
.. Software or, alternatively, in accordance with the terms contained in | ||
.. a written agreement between you and Shepherd's Oasis, LLC. | ||
.. For licensing terms and conditions see your agreement. For | ||
.. further information contact opensource@soasis.org. | ||
.. | ||
.. Apache License Version 2 Usage | ||
.. Alternatively, this file may be used under the terms of Apache License | ||
.. Version 2.0 (the "License") for non-commercial use; you may not use this | ||
.. file except in compliance with the License. You may obtain a copy of the | ||
.. License at | ||
.. | ||
.. https://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
.. | ||
.. =============================================================================> | ||
endian | ||
====== | ||
|
||
The endian enumeration is a very simple enum used to communicate what kind of byte ordering certain parts of the library should use to interpret incoming byte sequences. The C version uses macros and can be found :doc:`here </c_api/endian>`. | ||
|
||
.. doxygendefine:: ZTDC_LITTLE_ENDIAN | ||
|
||
.. doxygendefine:: ZTDC_BIG_ENDIAN | ||
|
||
.. doxygendefine:: ZTDC_NATIVE_ENDIAN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. ============================================================================= | ||
.. | ||
.. ztd.idk | ||
.. Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
.. Contact: opensource@soasis.org | ||
.. | ||
.. Commercial License Usage | ||
.. Licensees holding valid commercial ztd.idk licenses may use this file in | ||
.. accordance with the commercial license agreement provided with the | ||
.. Software or, alternatively, in accordance with the terms contained in | ||
.. a written agreement between you and Shepherd's Oasis, LLC. | ||
.. For licensing terms and conditions see your agreement. For | ||
.. further information contact opensource@soasis.org. | ||
.. | ||
.. Apache License Version 2 Usage | ||
.. Alternatively, this file may be used under the terms of Apache License | ||
.. Version 2.0 (the "License") for non-commercial use; you may not use this | ||
.. file except in compliance with the License. You may obtain a copy of the | ||
.. License at | ||
.. | ||
.. https://www.apache.org/licenses/LICENSE-2.0 | ||
.. | ||
.. Unless required by applicable law or agreed to in writing, software | ||
.. distributed under the License is distributed on an "AS IS" BASIS, | ||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
.. See the License for the specific language governing permissions and | ||
.. limitations under the License. | ||
.. | ||
.. =============================================================================> | ||
Extent | ||
====== | ||
|
||
These utilities are for handling extents (arrays and pointers) in C and C++. | ||
|
||
.. doxygendefine:: ZTD_PTR_EXTENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.