lib: split real FC/field into single and double prec FC/field
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 26 Sep 2019 20:13:22 +0000 (16:13 -0400)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 30 Sep 2019 12:28:49 +0000 (08:28 -0400)
commitfe4df857056b4a03898f1031f136359ce733b0f5
tree1bdc028a79c99ee173c301c9e5a5c711d9223eec
parent4bf5c85fc4fe021489669155ae5de25e86397575
lib: split real FC/field into single and double prec FC/field

This commit removes the BT_FIELD_CLASS_TYPE_REAL field class and the
corresponding fields and adds BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL
and BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL field classes and their
fields.

This seems like cleaner way to express the different types of floating
point representations and while keeping the door open for other
(smaller and/or larger) representations.

The test_field.py testcases for `_SinglePrecisionRealField` are
implemented using a default value of 52.0 which can be converted from
Python float(double precision) to C float(single precision) without loss
of precision. It's the best way I found to support the
`_TestNumericField` test cases without scattering specific conditions
for `_SinglePrecisionRealField`

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I6057e1626b71fee5dce1c374bda3faf3451b5fef
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2099
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
31 files changed:
include/babeltrace2/trace-ir/field-class-const.h
include/babeltrace2/trace-ir/field-class.h
include/babeltrace2/trace-ir/field-const.h
include/babeltrace2/trace-ir/field.h
src/bindings/python/bt2/bt2/__init__.py
src/bindings/python/bt2/bt2/field.py
src/bindings/python/bt2/bt2/field_class.py
src/bindings/python/bt2/bt2/trace_class.py
src/common/common.h
src/lib/lib-logging.c
src/lib/trace-ir/field-class.c
src/lib/trace-ir/field-class.h
src/lib/trace-ir/field.c
src/plugins/ctf/common/metadata/ctf-meta-translate.c
src/plugins/ctf/common/msg-iter/msg-iter.c
src/plugins/ctf/fs-sink/fs-sink-ctf-meta.h
src/plugins/ctf/fs-sink/fs-sink-stream.c
src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.c
src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c
src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c
src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c
src/plugins/text/details/write.c
src/plugins/text/pretty/print.c
tests/bindings/python/bt2/test_event.py
tests/bindings/python/bt2/test_field.py
tests/bindings/python/bt2/test_field_class.py
tests/bindings/python/bt2/test_package.py
tests/bindings/python/bt2/test_packet.py
tests/data/plugins/sink.ctf.fs/succeed/trace-double.expect
tests/data/plugins/sink.ctf.fs/succeed/trace-float.expect
tests/data/plugins/src.ctf.fs/succeed/trace-session-rotation.expect
This page took 0.028062 seconds and 4 git commands to generate.