Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a SpanSearchValue class that allows tree-searching without extra intermediate if null/missing checks. #36754

Merged
merged 38 commits into from
Dec 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
36e224e
Start adding the fluent tree object
andreilitvin Dec 6, 2024
12748b6
Start adding unit tests
andreilitvin Dec 6, 2024
91b2879
Add test file
andreilitvin Dec 6, 2024
55a667b
more testing
andreilitvin Dec 6, 2024
108c70e
update sizes hint and make use of things into CodegenDataModelProvider
andreilitvin Dec 6, 2024
eb224fd
Restyle
andreilitvin Dec 6, 2024
bb93623
Fix some commments
andreilitvin Dec 6, 2024
e413adf
More merge fixes
andreilitvin Dec 6, 2024
2a31787
Merge branch 'master' into fluent_search_class
andy31415 Dec 9, 2024
95bdb5e
Remove some odd copy&paste comments
andy31415 Dec 9, 2024
0ca7840
Update src/lib/support/FluentTreeObject.h
andy31415 Dec 10, 2024
a794147
Update src/lib/support/FluentTreeObject.h
andy31415 Dec 10, 2024
52d8e8e
Fix up comments a bit
andreilitvin Dec 10, 2024
cbac1da
Simplify FluentTreeObject a bit
andreilitvin Dec 10, 2024
c48cca0
Merge branch 'fluent_search_class' of github.com:andy31415/connectedh…
andreilitvin Dec 10, 2024
f113313
Merge branch 'master' into fluent_search_class
andreilitvin Dec 10, 2024
d74da85
Extra wrapper not needed
andreilitvin Dec 10, 2024
41db748
Cleaned up comments
andreilitvin Dec 10, 2024
6b03605
Restyled by clang-format
restyled-commits Dec 10, 2024
0ac8f35
Sed rename FluentTreeObject to SpanSearchValue
andreilitvin Dec 10, 2024
7a6e40f
Also rename files
andreilitvin Dec 10, 2024
40e9d2c
Restyle
andreilitvin Dec 10, 2024
ce68521
Merge branch 'master' into fluent_search_class
andreilitvin Dec 10, 2024
97a8400
Very slight reduction in complexity that reduces extra flash usage by…
andreilitvin Dec 10, 2024
57fc226
Another minor source code size decrease
andreilitvin Dec 10, 2024
83210cf
Even slightly smaller code
andreilitvin Dec 10, 2024
aeec08e
Restyle
andreilitvin Dec 10, 2024
a5dfcdc
Fix comment typo
andreilitvin Dec 10, 2024
463504d
make cc32xx compile optimized for size by default, so we can treak fl…
andreilitvin Dec 10, 2024
2aa7c96
Restyled by gn
restyled-commits Dec 10, 2024
9315ba1
Merge branch 'master' into fluent_search_class
andy31415 Dec 11, 2024
c4cc012
Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp
andy31415 Dec 13, 2024
cde485e
Update src/lib/support/SpanSearchValue.h
andy31415 Dec 13, 2024
9575bcb
Update src/lib/support/SpanSearchValue.h
andy31415 Dec 13, 2024
02e48fa
Update src/lib/support/SpanSearchValue.h
andy31415 Dec 13, 2024
8fbe78e
Rename tree to searchable
andreilitvin Dec 13, 2024
39fede8
Fix comment
andreilitvin Dec 13, 2024
6103ce4
Restyled by clang-format
restyled-commits Dec 13, 2024
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
Prev Previous commit
Next Next commit
Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
  • Loading branch information
andy31415 and bzbarsky-apple authored Dec 13, 2024
commit c4cc012d331ffe5eb920b00834e0f0b4cc2ee4c2
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ std::optional<DataModel::DeviceTypeEntry> CodegenDataModelProvider::FirstDeviceT
}

CHIP_ERROR err = CHIP_NO_ERROR;
chip::Span<const EmberAfDeviceType> deviceTypes = emberAfDeviceTypeListFromEndpointIndex(*endpoint_index, err);
Span<const EmberAfDeviceType> deviceTypes = emberAfDeviceTypeListFromEndpointIndex(*endpoint_index, err);
SpanSearchValue<chip::Span<const EmberAfDeviceType>> tree(&deviceTypes);
andy31415 marked this conversation as resolved.
Show resolved Hide resolved

return DeviceTypeEntryFromEmber(tree.First<ByDeviceType>(mDeviceTypeIterationHint).Value());
Expand Down
Loading