-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ ztd.text and friend benchmarks, promotion of text_encoding_id
- Loading branch information
Showing
52 changed files
with
4,396 additions
and
84 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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.text | ||
# Copyright © 2022-2022 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: opensource@soasis.org | ||
# | ||
# Commercial License Usage | ||
# Licensees holding valid commercial ztd.text licenses may use this file | ||
# in accordance with the commercial license agreement provided with the | ||
# Software or, alternatively, in accordance with the terms contained in | ||
# a written agreement between you and Shepherd's Oasis, LLC. | ||
# For licensing terms and conditions see your agreement. For | ||
# further information contact opensource@soasis.org. | ||
# | ||
# Apache License Version 2 Usage | ||
# Alternatively, this file may be used under the terms of Apache License | ||
# Version 2.0 (the "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# =========================================================================== # | ||
|
||
include(FetchContent) | ||
include(GraphBenchmarks) | ||
|
||
# # Fetch dependencies | ||
# Google Benchmark | ||
function(googlebenchmark_dependency_jail) | ||
FetchContent_Declare( | ||
googlebenchmark | ||
GIT_REPOSITORY https://github.com/google/benchmark.git | ||
GIT_TAG 108ca84820dc932957b75e6b31faa6c3cf0aa37a | ||
) | ||
FetchContent_GetProperties(googlebenchmark) | ||
|
||
if(NOT googlebenchmark_POPULATED) | ||
FetchContent_Populate(googlebenchmark) | ||
set(BENCHMARK_ENABLE_INSTALL OFF CACHE INTERNAL "") | ||
set(BENCHMARK_ENABLE_TESTING OFF CACHE INTERNAL "") | ||
set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE INTERNAL "") | ||
set(BENCHMARK_ENABLE_WERROR OFF CACHE INTERNAL "") | ||
set(BENCHMARK_FORCE_WERROR OFF CACHE INTERNAL "") | ||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND WIN32) | ||
# google benchmark is broken, so we need to force HAVE_STD_REGEX to be on for this. | ||
set(HAVE_STD_REGEX ON CACHE INTERNAL "") | ||
endif() | ||
add_subdirectory(${googlebenchmark_SOURCE_DIR} ${googlebenchmark_BINARY_DIR}) | ||
endif() | ||
endfunction() | ||
googlebenchmark_dependency_jail() | ||
|
||
function (utf8cpp_dependency_jail) | ||
FetchContent_Declare( | ||
utf8cpp | ||
GIT_REPOSITORY https://github.com/nemtrif/utfcpp | ||
) | ||
FetchContent_MakeAvailable(utf8cpp) | ||
endfunction() | ||
utf8cpp_dependency_jail() | ||
|
||
function (ctre_dependency_jail) | ||
FetchContent_Declare( | ||
ctre | ||
GIT_REPOSITORY https://github.com/hanickadot/compile-time-regular-expressions | ||
GIT_TAG main | ||
) | ||
FetchContent_MakeAvailable(ctre) | ||
endfunction() | ||
ctre_dependency_jail() | ||
|
||
function(ztd_platform_dependency_jail) | ||
# ztd.platform | ||
FetchContent_Declare( | ||
ztd.platform | ||
GIT_REPOSITORY https://github.com/soasis/platform | ||
GIT_TAG main | ||
) | ||
FetchContent_MakeAvailable(ztd.platform) | ||
endfunction() | ||
ztd_platform_dependency_jail() | ||
|
||
add_subdirectory(barrier) | ||
add_subdirectory(function_form) | ||
add_subdirectory(speed) |
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.text | ||
# Copyright © 2022-2022 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: opensource@soasis.org | ||
# | ||
# Commercial License Usage | ||
# Licensees holding valid commercial ztd.text licenses may use this file | ||
# in accordance with the commercial license agreement provided with the | ||
# Software or, alternatively, in accordance with the terms contained in | ||
# a written agreement between you and Shepherd's Oasis, LLC. | ||
# For licensing terms and conditions see your agreement. For | ||
# further information contact opensource@soasis.org. | ||
# | ||
# Apache License Version 2 Usage | ||
# Alternatively, this file may be used under the terms of Apache License | ||
# Version 2.0 (the "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# =========================================================================== # | ||
|
||
# # Benchmarks | ||
file(GLOB_RECURSE ztd.text.benchmarks.barrier.sources | ||
LIST_DIRECTORIES FALSE | ||
CONFIGURE_DEPENDS | ||
source/*.c source/*.cpp) | ||
|
||
add_library(ztd.text.benchmarks.barrier | ||
SHARED | ||
${ztd.text.benchmarks.barrier.sources} | ||
) | ||
add_library(ztd::cuneicode::benchmarks::barrier | ||
ALIAS | ||
ztd.text.benchmarks.barrier | ||
) | ||
target_compile_definitions(ztd.text.benchmarks.barrier | ||
PRIVATE | ||
ZTD_TEXT_BENCHMARKS_BARRIER_BUILD=1 | ||
PUBLIC | ||
ZTD_TEXT_BENCHMARKS_BARRIER_DLL=1 | ||
) | ||
target_compile_options(ztd.text.benchmarks.barrier | ||
PRIVATE | ||
${--utf8-literal-encoding} | ||
${--utf8-source-encoding} | ||
${--disable-permissive} | ||
${--updated-cpp-version-flag} | ||
${--warn-pedantic} | ||
${--warn-all} | ||
${--warn-extra} | ||
${--warn-errors}) | ||
target_link_libraries(ztd.text.benchmarks.barrier | ||
PRIVATE | ||
ztd::cuneicode | ||
${CMAKE_DL_LIBS} | ||
) | ||
target_include_directories(ztd.text.benchmarks.barrier | ||
PUBLIC | ||
include | ||
) |
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// ============================================================================= | ||
// | ||
// ztd.idk | ||
// Copyright © 2022 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: opensource@soasis.org | ||
// | ||
// Commercial License Usage | ||
// Licensees holding valid commercial ztd.idk licenses may use this file in | ||
// accordance with the commercial license agreement provided with the | ||
// Software or, alternatively, in accordance with the terms contained in | ||
// a written agreement between you and Shepherd's Oasis, LLC. | ||
// For licensing terms and conditions see your agreement. For | ||
// further information contact opensource@soasis.org. | ||
// | ||
// Apache License Version 2 Usage | ||
// Alternatively, this file may be used under the terms of Apache License | ||
// Version 2.0 (the "License") for non-commercial use; you may not use this | ||
// file except in compliance with the License. You may obtain a copy of the | ||
// License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ============================================================================ // | ||
|
||
#pragma once | ||
|
||
#ifndef ZTD_TEXT_BENCHMARKS_BARRIER_API_H | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_API_H | ||
|
||
#include <barrier/version.h> | ||
|
||
// clang-format off | ||
|
||
#if defined(ZTD_TEXT_BENCHMARKS_BARRIER_BUILD) | ||
#if (ZTD_TEXT_BENCHMARKS_BARRIER_BUILD != 0) | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_BUILD_I_ ZTD_ON | ||
#else | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_BUILD_I_ ZTD_OFF | ||
#endif | ||
#else | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_BUILD_I_ ZTD_DEFAULT_OFF | ||
#endif // Building or not | ||
|
||
#if defined(ZTD_TEXT_BENCHMARKS_BARRIER_DLL) | ||
#if (ZTD_TEXT_BENCHMARKS_BARRIER_DLL != 0) | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_DLL_I_ ZTD_ON | ||
#else | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_DLL_I_ ZTD_ON | ||
#endif | ||
#else | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_DLL_I_ ZTD_OFF | ||
#endif // Building or not | ||
|
||
#if defined(ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE) | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE_I_ ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE | ||
#else | ||
#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_BARRIER_DLL) | ||
#if ZTD_IS_ON(ZTD_COMPILER_VCXX) || ZTD_IS_ON(ZTD_PLATFORM_WINDOWS) || ZTD_IS_ON(ZTD_PLATFORM_CYGWIN) | ||
// MSVC Compiler; or, Windows, or Cygwin platforms | ||
#if ZTD_IS_ON(ZTD_TEXT_BENCHMARKS_BARRIER_BUILD) | ||
// Building the library | ||
#if ZTD_IS_ON(ZTD_COMPILER_GCC) | ||
// Using GCC | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE_I_ __attribute__((dllexport)) | ||
#else | ||
// Using Clang, MSVC, etc... | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE_I_ __declspec(dllexport) | ||
#endif | ||
#else | ||
#if ZTD_IS_ON(ZTD_COMPILER_GCC) | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE_I_ __attribute__((dllimport)) | ||
#else | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE_I_ __declspec(dllimport) | ||
#endif | ||
#endif | ||
#else | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE_I_ | ||
#endif | ||
#else | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_API_LINKAGE_I_ | ||
#endif // DLL or not | ||
#endif // Build definitions | ||
|
||
// clang-format on | ||
|
||
#endif // ZTD_TEXT_BENCHMARKS_BARRIER_API_H |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// ============================================================================ | ||
// | ||
// ztd.text | ||
// Copyright © 2022-2022 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: opensource@soasis.org | ||
// | ||
// Commercial License Usage | ||
// Licensees holding valid commercial ztd.text licenses may use this file | ||
// in accordance with the commercial license agreement provided with the | ||
// Software or, alternatively, in accordance with the terms contained in | ||
// a written agreement between you and Shepherd's Oasis, LLC. | ||
// For licensing terms and conditions see your agreement. For | ||
// further information contact opensource@soasis.org. | ||
// | ||
// Apache License Version 2 Usage | ||
// Alternatively, this file may be used under the terms of Apache License | ||
// Version 2.0 (the "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ========================================================================= // | ||
|
||
#pragma once | ||
|
||
#ifndef ZTD_TEXT_BENCHMARKS_BARRIER_BARRIER_H | ||
#define ZTD_TEXT_BENCHMARKS_BARRIER_BARRIER_H | ||
|
||
#include <barrier/version.h> | ||
|
||
#include <barrier/convert.h> | ||
#include <barrier/data.h> | ||
|
||
#endif // ZTD_TEXT_BENCHMARKS_BARRIER_BARRIER_H |
Oops, something went wrong.