Main Content
hdl.treesum
Description
returns the sum of the elements of A along the first array dimension whose size does not
equal 1. S
= hdl.treesum(A
)
If
A
is a vector, thenhdl.treesum(A)
returns the sum of the elements.If
A
is a matrix, thenhdl.treesum(A)
returns a row vector containing the sum of each column.
The function hdl.treesum
uses a tree architecture to sum elements.
The tree architecture summation yields a shorter critical path, which leads to reduced
latency when generating HDL code from a MATLAB Function block. When
generating HDL code, the function hdl.treesum
reduces the amount of
matching delays required to sum elements.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2022a