Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ message("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")

cmake_minimum_required(VERSION 3.5.0)

project(CGraph VERSION 3.2.2)
project(CGraph VERSION 3.2.3)

if(NOT DEFINED CMAKE_CXX_STANDARD)
# CGraph默认使用C++11版本,推荐使用C++17版本。暂不支持C++11以下版本
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,10 @@ if __name__ == '__main__':
* 提供 本地保存和加载 功能
* 修改 `PyCGraph` 为 `pycgraph`,支持 `pip3 install pycgraph` 安装

[2026.03.24 - v3.2.3 - Chunel]
* 优化 `message` 功能
* 优化 稳定性

</details>

------------
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pybind11

__PYCGRAPH_NAME__ = "pycgraph"
__PYCGRAPH_VERSION__ = "3.2.2"
__PYCGRAPH_VERSION__ = "3.2.3"
__PYCGRAPH_AUTHOR__ = "Chunel"
__PYCGRAPH_AUTHOR_EMAIL__ = "chunel@foxmail.com"
__PYCGRAPH_DESCRIPTION__ = "CGraph with python api wrapper by pybind11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ CVoid GDynamicEngine::commonRunAll() {
* 3. 等待异步执行结束
*/
finished_end_size_ = 0;
for (const auto& element : front_element_arr_) {
process(element, element == front_element_arr_.back() && element->isDefaultBinding());
for (auto* element : front_element_arr_) {
process(element, element == front_element_arr_.back());
}

fatWait();
Expand Down
32 changes: 16 additions & 16 deletions src/UtilsCtrl/Reflection/UReflectionSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,67 +16,67 @@ CGRAPH_INTERNAL_NAMESPACE_BEGIN

class UReflSession : public UtilsObject {
public:
explicit UReflSession(CUCharPtr data, size_t len)
: data_(data), len_(len) {}
explicit UReflSession(const CUCharPtr data, const size_t len)
: len_(len), data_(data) {}

explicit UReflSession() = default;

template<class T>
inline void getValueAndOffset(T &value) {
void getValueAndOffset(T &value) {
constexpr size_t len = sizeof(T);
memcpy(&value, data_ + offset_, len);
offset_ += len;
}

inline void setBufferAndOffset(CUCharPtr buffer, size_t len) {
void setBufferAndOffset(CUCharPtr buffer, const size_t len) {
memcpy(data_ + offset_, buffer, len);
offset_ += len;
}

inline void getStringAndOffset(std::string &value, size_t len) {
void getStringAndOffset(std::string &value, const size_t len) {
value.assign((CCharPtr)(data_ + offset_), len);
offset_ += len;
}

template<class T>
inline void setValueAndOffset(const T &value) {
void setValueAndOffset(const T &value) {
constexpr size_t len = sizeof(T);
memcpy(data_ + offset_, &value, len);
offset_ += len;
}

inline void addLen(size_t len) {
void addLen(const size_t len) {
len_ += len;
}

inline void addOffset(size_t len) {
void addOffset(const size_t len) {
offset_ += len;
}

inline void setPosValue(size_t offset, CUCharPtr value, size_t len) const {
void setPosValue(const size_t offset, CUCharPtr value, const size_t len) const {
memcpy(data_ + offset, value, len);
}

[[nodiscard]] inline CUCharPtr getCurrentPos() const {
[[nodiscard]] CUCharPtr getCurrentPos() const {
return data_ + offset_;
}

[[nodiscard]] inline size_t getCurrentOffset() const {
[[nodiscard]] size_t getCurrentOffset() const {
return offset_;
}

[[nodiscard]] inline bool isEmpty() const {
[[nodiscard]] bool isEmpty() const {
return len_ <= offset_;
}

[[nodiscard]] inline size_t getLen() const {
[[nodiscard]] size_t getLen() const {
return len_;
}

private:
size_t len_{0}; // 整体长度
size_t offset_{0}; // 当前偏移量
CUCharPtr data_{nullptr}; // 真实数据
size_t len_ {0}; // 整体长度
size_t offset_ {0}; // 当前偏移量
CUCharPtr data_ {nullptr}; // 真实数据
};

CGRAPH_INTERNAL_NAMESPACE_END
Expand Down
19 changes: 1 addition & 18 deletions test/Functional/test-functional-01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,7 @@ void test_functional_01() {

{
UTimeCounter counter("test_functional_01");
{
UTimeCounter ic("test_functional_init_01", CGRAPH_PRIMARY_THREAD_EMPTY_INTERVAL);
status += pipeline->init();
}

for (auto x = 0; x < runTimes; x++) {
UTimeCounter rc("test_functional_run_01", CGRAPH_PRIMARY_THREAD_EMPTY_INTERVAL);
status += pipeline->run();
if (rc.getSpan() >= CGRAPH_PRIMARY_THREAD_EMPTY_INTERVAL) {
std::cout << " [timeout] test_functional_01 times = " << x << " span = " << rc.getSpan() << std::endl;
break;
}
}

{
UTimeCounter dc("test_functional_destroy_01", CGRAPH_PRIMARY_THREAD_EMPTY_INTERVAL);
status += pipeline->destroy();
}
status += pipeline->process(runTimes);
}

if (status.isErr()) {
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set_project("CGraph")

-- set project version
set_version("3.2.2")
set_version("3.2.3")

-- set language: c++11
set_languages("c++11")
Expand Down
Loading