Rename the endian typedefs. Rationale: Subjective - during three months working on the B-tree library, the *un_t names were a constant source of irritation. Objective - the new scheme, which reverts the *un_t names to having no alignment decoration, provides consistent *_align* decoration for both FP and integer types. Also, the library now provides conversion functions which may reduce use of aligned endian types.

This commit is contained in:
Beman
2013-09-01 08:40:32 -04:00
parent d1d62f3adc
commit 016d3b2e7c
10 changed files with 902 additions and 902 deletions
+54 -54
View File
@@ -116,87 +116,87 @@ namespace
}
void test_big_int16()
void test_big_align_int16()
{
cout << "<tr><td>16-bit aligned big endian</td>";
time<int16_t, big_align_int16_t>();
cout << "</tr>\n";
}
void test_little_align_int16()
{
cout << "<tr><td>16-bit aligned little endian</td>";
time<int16_t, little_align_int16_t>();
cout << "</tr>\n";
}
void test_big_int16()
{
cout << "<tr><td>16-bit unaligned big endian</td>";
time<int16_t, big_int16_t>();
cout << "</tr>\n";
}
void test_little_int16()
{
cout << "<tr><td>16-bit aligned little endian</td>";
cout << "<tr><td>16-bit unaligned little endian</td>";
time<int16_t, little_int16_t>();
cout << "</tr>\n";
}
void test_big_int16un()
{
cout << "<tr><td>16-bit unaligned big endian</td>";
time<int16_t, big_int16un_t>();
cout << "</tr>\n";
}
void test_little_int16un()
{
cout << "<tr><td>16-bit unaligned little endian</td>";
time<int16_t, little_int16un_t>();
cout << "</tr>\n";
}
void test_big_int32()
void test_big_align_int32()
{
cout << "<tr><td>32-bit aligned big endian</td>";
time<int32_t, big_align_int32_t>();
cout << "</tr>\n";
}
void test_little_align_int32()
{
cout << "<tr><td>32-bit aligned little endian</td>";
time<int32_t, little_align_int32_t>();
cout << "</tr>\n";
}
void test_big_int32()
{
cout << "<tr><td>32-bit unaligned big endian</td>";
time<int32_t, big_int32_t>();
cout << "</tr>\n";
}
void test_little_int32()
{
cout << "<tr><td>32-bit aligned little endian</td>";
cout << "<tr><td>32-bit unaligned little endian</td>";
time<int32_t, little_int32_t>();
cout << "</tr>\n";
}
void test_big_int32un()
{
cout << "<tr><td>32-bit unaligned big endian</td>";
time<int32_t, big_int32un_t>();
cout << "</tr>\n";
}
void test_little_int32un()
{
cout << "<tr><td>32-bit unaligned little endian</td>";
time<int32_t, little_int32un_t>();
cout << "</tr>\n";
}
void test_big_int64()
void test_big_align_int64()
{
cout << "<tr><td>64-bit aligned big endian</td>";
time<int64_t, big_align_int64_t>();
cout << "</tr>\n";
}
void test_little_align_int64()
{
cout << "<tr><td>64-bit aligned little endian</td>";
time<int64_t, little_align_int64_t>();
cout << "</tr>\n";
}
void test_big_int64()
{
cout << "<tr><td>64-bit unaligned big endian</td>";
time<int64_t, big_int64_t>();
cout << "</tr>\n";
}
void test_little_int64()
{
cout << "<tr><td>64-bit aligned little endian</td>";
time<int64_t, little_int64_t>();
cout << "</tr>\n";
}
void test_big_int64un()
{
cout << "<tr><td>64-bit unaligned big endian</td>";
time<int64_t, big_int64un_t>();
cout << "</tr>\n";
}
void test_little_int64un()
{
cout << "<tr><td>64-bit unaligned little endian</td>";
time<int64_t, little_int64un_t>();
time<int64_t, little_int64_t>();
cout << "</tr>\n";
}
@@ -224,20 +224,20 @@ int cpp_main(int argc, char* argv[])
"</tr>\n"
;
test_big_align_int16();
test_little_align_int16();
test_big_int16();
test_little_int16();
test_big_int16un();
test_little_int16un();
test_big_align_int32();
test_little_align_int32();
test_big_int32();
test_little_int32();
test_big_int32un();
test_little_int32un();
test_big_align_int64();
test_little_align_int64();
test_big_int64();
test_little_int64();
test_big_int64un();
test_little_int64un();
cout << "\n</table>\n</body>\n</html>\n";