-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
β π Remove redundant .clang-format entries β π¨ Shift around implementation of cuneicode benchmarks and improve error reporting β π Fix up boost.text benchmarks and examples to compile with less extra effort about its warnings and other issues
- Loading branch information
Showing
618 changed files
with
1,391 additions
and
1,095 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.text | ||
# Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: [email protected] | ||
# | ||
# Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.text | ||
# Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: [email protected] | ||
# | ||
# Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.text | ||
# Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: [email protected] | ||
# | ||
# Commercial License Usage | ||
|
@@ -107,6 +107,7 @@ if(ZTD_TEXT_IS_TOP_LEVEL_PROJECT) | |
# Warning flags | ||
check_compiler_flag(warn-pedantic MSVC /permissive- GCC -pedantic) | ||
check_compiler_flag(warn-all MSVC /W4 GCC -Wall) | ||
check_compiler_flag(warn-none MSVC /W0 GCC -w Clang -w) | ||
check_compiler_flag(warn-errors MSVC /WX GCC -Werror) | ||
check_compiler_flag(warn-extra GCC -Wextra Clang -Wextra) | ||
check_compiler_diagnostic(alignas-extra-padding MSVC 4324 LANGUAGES CXX) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
ztd.text | ||
Non-Commerical License | ||
Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
Contact: [email protected] | ||
|
||
|
||
|
@@ -68,7 +68,7 @@ END OF TERMS AND CONDITIONS | |
|
||
ztd.text | ||
Commerical License Usage | ||
Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
Contact: [email protected] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ztd.text | ||
Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
Contact: [email protected] | ||
|
||
This product includes software developed at | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.text | ||
# Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: [email protected] | ||
# | ||
# Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.text | ||
# Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: [email protected] | ||
# | ||
# Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================= | ||
// | ||
// ztd.idk | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
@@ -53,7 +53,7 @@ static auto init_u8_unicode_data() { | |
const ztd_char32_t* input = &c; | ||
size_t input_size = 1; | ||
size_t output_size = ztdc_c_array_size(output_buffer); | ||
cnc_mcerr err = cnc_c32ntoc8n(&output_size, &output, &input_size, &input); | ||
cnc_mcerr err = cnc_c32ntoc8n(&output_size, &output, &input_size, &input); | ||
if (err != cnc_mcerr_ok) { | ||
throw std::runtime_error("bad idea"); | ||
} | ||
|
@@ -80,7 +80,7 @@ static auto init_u16_unicode_data() { | |
const ztd_char32_t* input = &c; | ||
size_t input_size = 1; | ||
size_t output_size = ztdc_c_array_size(output_buffer); | ||
cnc_mcerr err = cnc_c32ntoc16n(&output_size, &output, &input_size, &input); | ||
cnc_mcerr err = cnc_c32ntoc16n(&output_size, &output, &input_size, &input); | ||
if (err != cnc_mcerr_ok) { | ||
throw std::runtime_error("bad idea"); | ||
} | ||
|
@@ -121,17 +121,20 @@ ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE_I_ c_span_char32_t u32_unicode_data | |
= make_c_span_char32_t(u32_unicode_vec.data(), u32_unicode_vec.data() + u32_unicode_vec.size()); | ||
|
||
static auto init_u8_basic_source_data() { | ||
std::vector<ztd_char8_t> data(ztd::tests::u8_basic_source_character_set.cbegin(), ztd::tests::u8_basic_source_character_set.cend()); | ||
std::vector<ztd_char8_t> data( | ||
ztd::tests::u8_basic_source_character_set.cbegin(), ztd::tests::u8_basic_source_character_set.cend()); | ||
return data; | ||
} | ||
|
||
static auto init_u16_basic_source_data() { | ||
std::vector<ztd_char16_t> data(ztd::tests::u16_basic_source_character_set.cbegin(), ztd::tests::u16_basic_source_character_set.cend()); | ||
std::vector<ztd_char16_t> data( | ||
ztd::tests::u16_basic_source_character_set.cbegin(), ztd::tests::u16_basic_source_character_set.cend()); | ||
return data; | ||
} | ||
|
||
static auto init_u32_basic_source_data() { | ||
std::vector<ztd_char32_t> data(ztd::tests::u32_basic_source_character_set.cbegin(), ztd::tests::u32_basic_source_character_set.cend()); | ||
std::vector<ztd_char32_t> data( | ||
ztd::tests::u32_basic_source_character_set.cbegin(), ztd::tests::u32_basic_source_character_set.cend()); | ||
return data; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.text | ||
# Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: [email protected] | ||
# | ||
# Commercial License Usage | ||
|
@@ -33,6 +33,8 @@ file(GLOB_RECURSE ztd.text.benchmarks.conversion_speed.sources | |
CONFIGURE_DEPENDS | ||
LIST_DIRECTORIES NO | ||
source/**) | ||
set(ztd.text.benchmarks.conversion_speed.sources.no_warnings ${ztd.text.benchmarks.conversion_speed.sources}) | ||
list(FILTER ztd.text.benchmarks.conversion_speed.sources.no_warnings INCLUDE REGEX ".*\.no_warnings\..*") | ||
|
||
function (generate_converion_speed_benchmark_targets name data_name title) | ||
add_executable(ztd.text.benchmarks.conversion_speed.${name} ${ztd.text.benchmarks.conversion_speed.sources}) | ||
|
@@ -49,11 +51,18 @@ function (generate_converion_speed_benchmark_targets name data_name title) | |
ztd::cuneicode::shared::simdutf | ||
ztd::text | ||
ctre::ctre | ||
utf8::cpp | ||
utf8cpp | ||
$<$<BOOL:${ZTD_TEXT_BOOST.TEXT}>:Boost::text> | ||
benchmark::benchmark | ||
${CMAKE_DL_LIBS} | ||
) | ||
# boost.text is a landmine of bad warning-vomiting code | ||
if (ztd.text.benchmarks.conversion_speed.sources.no_warnings) | ||
set_source_files_properties(${ztd.text.benchmarks.conversion_speed.sources.no_warnings} | ||
PROPERTIES | ||
COMPILE_OPTIONS ${--warn-none} | ||
) | ||
endif() | ||
target_compile_options(ztd.text.benchmarks.conversion_speed.${name} | ||
PRIVATE | ||
${--utf8-literal-encoding} | ||
|
@@ -67,7 +76,7 @@ function (generate_converion_speed_benchmark_targets name data_name title) | |
${--allow-alignas-extra-padding} | ||
${--allow-stringop-overflow} ${--allow-stringop-overread} | ||
${--allow-array-bounds} | ||
) | ||
) | ||
target_compile_definitions(ztd.text.benchmarks.conversion_speed.${name} | ||
PRIVATE | ||
u8_data=u8_${data_name}_data | ||
|
2 changes: 1 addition & 1 deletion
2
benchmarks/conversion_speed/include/ztd/text/benchmarks/cuneicode_helpers.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================= | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
@@ -52,7 +52,7 @@ | |
using UToErrorHandler = ztd::remove_cvref_t<ToErrorHandler>; \ | ||
using UPivot = ztd::remove_cvref_t<Pivot>; \ | ||
using TranscodeResult \ | ||
= ztd::text::transcode_result<decltype(input), decltype(output), FromState, ToState, UPivot>; \ | ||
= ztd::text::transcode_result<decltype(input), decltype(output), FromState, ToState, UPivot>; \ | ||
if constexpr (ztd::text::is_ignorable_error_handler_v<UFromErrorHandler> /* cf */ \ | ||
&& ztd::text::is_ignorable_error_handler_v<UToErrorHandler>) { \ | ||
const std::size_t written_chars = (ztd::endian::native == ztd::endian::big \ | ||
|
@@ -96,7 +96,7 @@ | |
using UToErrorHandler = ztd::remove_cvref_t<ToErrorHandler>; \ | ||
using UPivot = ztd::remove_cvref_t<Pivot>; \ | ||
using TranscodeResult \ | ||
= ztd::text::transcode_result<decltype(input), decltype(output), FromState, ToState, UPivot>; \ | ||
= ztd::text::transcode_result<decltype(input), decltype(output), FromState, ToState, UPivot>; \ | ||
if constexpr (!ztd::text::is_ignorable_error_handler_v<UFromErrorHandler> /* cf */ \ | ||
|| !ztd::text::is_ignorable_error_handler_v<UToErrorHandler>) { \ | ||
const simdutf::result validate_res = (ztd::endian::native == ztd::endian::big \ | ||
|
@@ -153,8 +153,7 @@ auto text_transcode(::ztd::tag<ztd::text::utf8_t, ztd::text::utf32_t>, ztd::span | |
using UFromErrorHandler = ztd::remove_cvref_t<FromErrorHandler>; | ||
using UToErrorHandler = ztd::remove_cvref_t<ToErrorHandler>; | ||
using UPivot = ztd::remove_cvref_t<Pivot>; | ||
using TranscodeResult | ||
= ztd::text::transcode_result<decltype(input), decltype(output), FromState, ToState, UPivot>; | ||
using TranscodeResult = ztd::text::transcode_result<decltype(input), decltype(output), FromState, ToState, UPivot>; | ||
constexpr bool no_error_handling = ztd::text::is_ignorable_error_handler_v<UFromErrorHandler> // cf | ||
&& ztd::text::is_ignorable_error_handler_v<UToErrorHandler>; | ||
if constexpr (no_error_handling) { | ||
|
@@ -203,8 +202,7 @@ auto text_transcode(::ztd::tag<ztd::text::utf8_t, ztd::text::utf32_t>, ztd::span | |
using UFromErrorHandler = ztd::remove_cvref_t<FromErrorHandler>; | ||
using UToErrorHandler = ztd::remove_cvref_t<ToErrorHandler>; | ||
using UPivot = ztd::remove_cvref_t<Pivot>; | ||
using TranscodeResult | ||
= ztd::text::transcode_result<decltype(input), decltype(output), FromState, ToState, UPivot>; | ||
using TranscodeResult = ztd::text::transcode_result<decltype(input), decltype(output), FromState, ToState, UPivot>; | ||
constexpr bool no_error_handling = ztd::text::is_ignorable_error_handler_v<UFromErrorHandler> // cf | ||
&& ztd::text::is_ignorable_error_handler_v<UToErrorHandler>; | ||
if constexpr (!no_error_handling) { | ||
|
2 changes: 1 addition & 1 deletion
2
benchmarks/conversion_speed/include/ztd/text/benchmarks/version.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================= | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
2 changes: 1 addition & 1 deletion
2
...ks/conversion_speed/source/boost.text.cpp β ...n_speed/source/boost.text.no_warnings.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright Β© 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Copyright Β© JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: [email protected] | ||
// | ||
// Commercial License Usage | ||
|
Oops, something went wrong.