-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed usage of std::vector and replaced with std::array (#33)
* Removed usage of std::vector and replaced with std::array added helper class `Buffer` to mimic the erase function of std::vector and move tailing data to start of array * review comments * fixed python binding, currently settings buffer size fixed to 256, as it was the default before * const/constexpr method and rename buffer to m_buffer * added cmake defined hdlcpp buffer size for python module. added return result to push_back function to allow exit on full internal buffer * unit test * rename using type of Hdlcpp template * rewording * function renaming
- Loading branch information
1 parent
ce99f64
commit f0df7fa
Showing
7 changed files
with
197 additions
and
55 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
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
set(MODULE_NAME phdlcpp) | ||
|
||
if(NOT DEFINED PYTHON_HDLCPP_BUFFER_SIZE) | ||
set(PYTHON_HDLCPP_BUFFER_SIZE 256) | ||
endif() | ||
|
||
pybind11_add_module(${MODULE_NAME} Phdlcpp.cpp) | ||
target_compile_definitions(${MODULE_NAME} PRIVATE -DPYTHON_HDLCPP_BUFFER_SIZE=${PYTHON_HDLCPP_BUFFER_SIZE}) | ||
install(TARGETS ${MODULE_NAME} LIBRARY DESTINATION /usr/lib) |
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
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.