Karl Wiberg c126937564 BoundedInlineVector: Vector class of bounded size with inline allocation
Selling point is that it never touches the heap. Intended use case is
cheaply returning a variable, bounded, and small number of things from
a function.

Specifically, there are situations where we'd like to return things like

  ArrayView<ArrayView<float>>

where we currently have to allocate an array of ArrayView<float> for
the outer ArrayView to point to, which is a bother; however, although
the outer ArrayView is of variable size, that size is statically
guaranteed to not exceed some small constant. After this CL, we'll be
able to instead return

  BoundedInlineVector<ArrayView<float>, kSmallConstant>

which is much more convenient. We already had the option of returning e.g.

  std::vector<ArrayView<float>>

but that would bloat our binary with code to handle heap allocations
in places we'd rather be lean and mean.

https://godbolt.org/z/r-vcPj demonstrates that the overhead compared to
a raw C array + a size is ~zero.

Bug: webrtc:11391
Change-Id: Ifb6d937193052588be641aa62cc67ba0ec64ded6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168944
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30663}
2020-03-02 20:45:58 +00:00
2018-10-05 14:40:21 +00:00
2020-02-20 14:24:29 +00:00
2020-03-02 15:05:48 +00:00
2020-02-27 14:27:23 +00:00
2019-10-28 12:27:50 +00:00
2020-02-07 17:57:30 +00:00
2017-09-15 04:25:06 +00:00
2018-12-18 12:30:58 +00:00
2019-10-08 12:20:39 +00:00
2017-09-15 04:25:06 +00:00
2018-07-23 15:28:48 +00:00
2017-09-15 04:25:06 +00:00
2020-01-21 12:13:11 +00:00
2020-01-28 07:53:15 +00:00

WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.

Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.

The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.

Development

See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.

Authoritative list of directories that contain the native API header files.

More info

Description
No description provided
Readme 255 MiB
Languages
C++ 88.6%
C 3.3%
Java 3%
Objective-C++ 1.9%
Python 1.9%
Other 1%