diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-06-22 19:08:19 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-06-22 19:08:19 -0700 |
commit | 9caf20c29956be283b032110096a81f99a121da7 (patch) | |
tree | f7cb1696923b43cad1089634a565ebdc17ac6606 /host | |
parent | 82f4822651adca3e8e384c744bc6eb58cfe6945a (diff) | |
download | uhd-9caf20c29956be283b032110096a81f99a121da7.tar.gz uhd-9caf20c29956be283b032110096a81f99a121da7.tar.bz2 uhd-9caf20c29956be283b032110096a81f99a121da7.zip |
converters: Clarifying comment re packing
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/convert/convert_pack_sc12.cpp | 5 | ||||
-rw-r--r-- | host/lib/convert/convert_unpack_sc12.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/convert/convert_pack_sc12.cpp b/host/lib/convert/convert_pack_sc12.cpp index 322097e34..370e4a3e4 100644 --- a/host/lib/convert/convert_pack_sc12.cpp +++ b/host/lib/convert/convert_pack_sc12.cpp @@ -25,6 +25,11 @@ using namespace uhd::convert; typedef boost::uint32_t (*towire32_type)(boost::uint32_t); +/* C language specification requires this to be packed + * (i.e., line0, line1, line2 will be in adjacent memory locations). + * If this was not true, we'd need compiler flags here to specify + * alignment/packing. + */ struct item32_sc12_3x { item32_t line0; diff --git a/host/lib/convert/convert_unpack_sc12.cpp b/host/lib/convert/convert_unpack_sc12.cpp index 94b415355..9f7a84300 100644 --- a/host/lib/convert/convert_unpack_sc12.cpp +++ b/host/lib/convert/convert_unpack_sc12.cpp @@ -25,6 +25,11 @@ using namespace uhd::convert; typedef boost::uint32_t (*tohost32_type)(boost::uint32_t); +/* C language specification requires this to be packed + * (i.e., line0, line1, line2 will be in adjacent memory locations). + * If this was not true, we'd need compiler flags here to specify + * alignment/packing. + */ struct item32_sc12_3x { item32_t line0; |