Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f5bd75f
Code cleanup
Epixu Nov 14, 2024
bf3ce4c
Ref::New returns a reference to itself
Epixu Nov 14, 2024
f0d6661
Improved Many::Past and Many::Future
Epixu Nov 18, 2024
52856cd
Fixing unmanaged builds
Epixu Nov 18, 2024
61b57de
Improved verb stringification
Epixu Nov 20, 2024
be5ad34
Block iteration now supports iterating using binary-compatible base t…
Epixu Jan 9, 2025
50e5265
Removing multicast/monocast verb states; Improved Block::Compare logging
Epixu Jan 17, 2025
e667dd6
Critical Block::KeepInner fix; Correct Bool->Text and Byte->Text conv…
Epixu Jan 21, 2025
6843d14
Added LocalRef as returned by Block::operator[] and Block::Emplace; O…
Epixu Jan 27, 2025
1c28011
Warning fix
Epixu Jan 28, 2025
ed7d00f
Include path restructure
Epixu Jan 28, 2025
f673a3a
Proper rounding when serializing to Text
Epixu Jan 31, 2025
5850df3
BlockMap::Rehash completely reworked; BlockMap iterators improved; Bl…
Epixu Feb 4, 2025
37175f5
Forgot to remove a logging
Epixu Feb 4, 2025
2aa6717
Addressing clang complaints
Epixu Feb 4, 2025
4e811b3
Warning fixes in tests
Epixu Feb 5, 2025
e5f034b
Never download an external project if already downloaded
Epixu Feb 5, 2025
a085497
Descriptor API now works with CountOf instead of ExtentOf; Critical b…
Epixu Feb 14, 2025
cef09e9
Now using common testing library
Epixu Feb 17, 2025
aa73a46
Bumped SIMD
Epixu Feb 17, 2025
892c4b9
Bumped dependencies
Epixu Feb 17, 2025
7e8a18a
Test maintenance
Epixu Feb 17, 2025
d89e3c9
Warning fix
Epixu Feb 17, 2025
4e75f54
Improving tests
Epixu Feb 18, 2025
4c2e8cc
Critical map hashing fixes; Pairs better capsulated; Tests fixes for …
Epixu Feb 18, 2025
a01a5df
Bumped RTTI
Epixu Feb 18, 2025
11d3bd7
Bumped SIMD
Epixu Feb 18, 2025
6708b12
Bumped dependencies
Epixu Feb 21, 2025
7a49602
Typo fix
Epixu Feb 22, 2025
7a5bd3c
Critical double Clear() fix
Epixu Mar 4, 2025
661ffb3
Updated SIMD, v143 x86 builds are not without SIMD due to MSVC ICE
Epixu Mar 4, 2025
e0bdf71
Critical THive fixes and more tests; Deleted some unneeded files
Epixu Mar 22, 2025
2515df6
Linking with profiler
Epixu Apr 1, 2025
fd98e1e
Improving an assumption
Epixu Apr 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
cmake_args: "-DCMAKE_CXX_FLAGS=-m64"
- os: windows-latest
arch: x86
cmake_args: "-G \"Visual Studio 17 2022\" -A Win32"
# /arch:IA32 means these are builds without SIMD, due to really bad compiler ICEs
# see https://github.com/Langulus/SIMD/issues/22 for more info and updates on the situation
cmake_args: "-G \"Visual Studio 17 2022\" -A Win32 -DCMAKE_CXX_FLAGS=\"/arch:IA32\""
- os: windows-latest
arch: x64
cmake_args: "-G \"Visual Studio 17 2022\" -A x64"
Expand Down
29 changes: 14 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ project(LangulusAnyness
HOMEPAGE_URL https://langulus.com
)

# Check if this project is built as standalone, or a part of something else
if(PROJECT_IS_TOP_LEVEL OR NOT LANGULUS)
# Check if this project is built as standalone, or a part of something else
if (PROJECT_IS_TOP_LEVEL OR NOT LANGULUS)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)

include(LangulusUtilities.cmake)

# Add Langulus::Core/Logger/RTTI/Fractalloc/SIMD libraries
fetch_langulus_module(Core GIT_TAG 35756f11d2f9c475f27b094b8d4c82cd453969fc)
fetch_langulus_module(Logger GIT_TAG dafbeb825071ec60d8403254143f75606151a7e6)
fetch_langulus_module(RTTI GIT_TAG fc49750884ac943dff4261ac5b8dfb2c148423d7)
fetch_langulus_module(RTTI GIT_TAG af0c2f6bf25d0436caf098b354350c7b681d1036)
if(LANGULUS_FEATURE_MANAGED_MEMORY)
fetch_langulus_module(Fractalloc GIT_TAG 66408e8557b1bb3c80615909129342bcebd3fb9f)
fetch_langulus_module(Fractalloc GIT_TAG cbb71d9b33c741e8856e8522632559b3082a39e9)
endif()
fetch_langulus_module(SIMD GIT_TAG ead5493049e2800b4c3c02d385c0c6314efac69c)
fetch_langulus_module(SIMD GIT_TAG 1238344af641de5d2fbe82e6a1743b041d996c52)
endif()

file(GLOB_RECURSE
Expand All @@ -28,18 +24,21 @@ file(GLOB_RECURSE
source/*.cpp
)

# Build and install Anyness library
# Build and install Anyness library
add_langulus_library(LangulusAnyness
$<TARGET_OBJECTS:LangulusLogger>
$<TARGET_OBJECTS:LangulusRTTI>
$<$<BOOL:${LANGULUS_FEATURE_MANAGED_MEMORY}>:$<TARGET_OBJECTS:LangulusFractalloc>>
$<$<BOOL:${LANGULUS_FEATURE_PROFILING}>:$<TARGET_OBJECTS:LangulusProfiler>>
${LANGULUS_ANYNESS_SOURCES}
)

target_include_directories(LangulusAnyness PUBLIC include
$<TARGET_PROPERTY:LangulusLogger,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:LangulusRTTI,INTERFACE_INCLUDE_DIRECTORIES>
$<$<BOOL:${LANGULUS_FEATURE_MANAGED_MEMORY}>:$<TARGET_PROPERTY:LangulusFractalloc,INTERFACE_INCLUDE_DIRECTORIES>>
target_include_directories(LangulusAnyness
PUBLIC $<TARGET_PROPERTY:LangulusLogger,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:LangulusRTTI,INTERFACE_INCLUDE_DIRECTORIES>
$<$<BOOL:${LANGULUS_FEATURE_MANAGED_MEMORY}>:$<TARGET_PROPERTY:LangulusFractalloc,INTERFACE_INCLUDE_DIRECTORIES>>
$<$<BOOL:${LANGULUS_FEATURE_PROFILING}>:$<TARGET_PROPERTY:LangulusProfiler,INTERFACE_INCLUDE_DIRECTORIES>>
include
)

target_link_libraries(LangulusAnyness
Expand All @@ -52,6 +51,6 @@ target_compile_definitions(LangulusAnyness
)

if(LANGULUS_TESTING)
enable_testing()
enable_testing()
add_subdirectory(test)
endif()
44 changes: 39 additions & 5 deletions LangulusUtilities.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
include(FetchContent)


# Utility for fetching Langulus libraries using FetchContent
function(fetch_langulus_module NAME GIT_TAG TAG)
if (LANGULUS)
message(FATAL_ERROR "You can't fetch Langulus::${NAME}, because this build \
indicates LANGULUS is being build along your project. The library you're \
trying to fetch should already be available locally.")
endif()

if(NOT DEFINED LANGULUS_EXTERNAL_DIRECTORY)
set(LANGULUS_EXTERNAL_DIRECTORY "${CMAKE_SOURCE_DIR}/external" CACHE PATH
"Place where external dependencies will be downloaded")
message(WARNING "LANGULUS_EXTERNAL_DIRECTORY not defined, using default: ${LANGULUS_EXTERNAL_DIRECTORY}")
message(WARNING "LANGULUS_EXTERNAL_DIRECTORY not defined, using default: \
${LANGULUS_EXTERNAL_DIRECTORY}")
endif()

message(STATUS "Fetching external Langulus::${NAME}...")
# Completely avoid downloading or updating anything, once the appropriate
# folder exists
string(TOUPPER ${NAME} UPPERCASE_NAME)
if (EXISTS "${LANGULUS_EXTERNAL_DIRECTORY}/${NAME}-src")
set(FETCHCONTENT_SOURCE_DIR_LANGULUS${UPPERCASE_NAME} "${LANGULUS_EXTERNAL_DIRECTORY}/${NAME}-src" CACHE INTERNAL "" FORCE)
message(STATUS "Reusing external library Langulus::${NAME}... \
(delete ${LANGULUS_EXTERNAL_DIRECTORY}/${NAME}-src manually in order to redownload)")
else()
unset(FETCHCONTENT_SOURCE_DIR_LANGULUS${UPPERCASE_NAME} CACHE)
message(STATUS "Downloading external library Langulus::${NAME}...")
endif()

FetchContent_Declare(
Langulus${NAME}
GIT_REPOSITORY https://github.com/Langulus/${NAME}.git
Expand All @@ -19,14 +39,28 @@ function(fetch_langulus_module NAME GIT_TAG TAG)
FetchContent_MakeAvailable(Langulus${NAME})
endfunction()


# Utility for fetching external libraries using FetchContent
function(fetch_external_module NAME GIT_REPOSITORY REPO GIT_TAG TAG)
if(NOT DEFINED LANGULUS_EXTERNAL_DIRECTORY)
set(LANGULUS_EXTERNAL_DIRECTORY "${CMAKE_SOURCE_DIR}/external" CACHE PATH
"Place where external dependencies will be downloaded")
message(WARNING "LANGULUS_EXTERNAL_DIRECTORY not defined, using default: ${LANGULUS_EXTERNAL_DIRECTORY}")
message(WARNING "LANGULUS_EXTERNAL_DIRECTORY not defined, \
using default: ${LANGULUS_EXTERNAL_DIRECTORY}")
endif()

message(STATUS "Fetching external library ${NAME}...")
# Completely avoid downloading or updating anything, once the appropriate
# folder exists
string(TOUPPER ${NAME} UPPERCASE_NAME)
if (EXISTS "${LANGULUS_EXTERNAL_DIRECTORY}/${NAME}-src")
set(FETCHCONTENT_SOURCE_DIR_${UPPERCASE_NAME} "${LANGULUS_EXTERNAL_DIRECTORY}/${NAME}-src" CACHE INTERNAL "" FORCE)
message(STATUS "Reusing external library ${NAME}... \
(delete ${LANGULUS_EXTERNAL_DIRECTORY}/${NAME}-src manually in order to redownload)")
else()
unset(FETCHCONTENT_SOURCE_DIR_${UPPERCASE_NAME} CACHE)
message(STATUS "Downloading external library ${NAME}...")
endif()

FetchContent_Declare(
${NAME}
GIT_REPOSITORY ${REPO}
Expand All @@ -41,4 +75,4 @@ function(fetch_external_module NAME GIT_REPOSITORY REPO GIT_TAG TAG)
string(TOLOWER ${NAME} LOWERCASE_NAME)
set(${NAME}_SOURCE_DIR "${${LOWERCASE_NAME}_SOURCE_DIR}" CACHE INTERNAL "${NAME} source directory")
set(${NAME}_BINARY_DIR "${${LOWERCASE_NAME}_BINARY_DIR}" CACHE INTERNAL "${NAME} binary directory")
endfunction()
endfunction()
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/many/TMany.inl"
#include "../../source/many/Bytes.inl"
#include "../../source/maps/TMap.inl"
#include "../../../source/many/TMany.inl"
#include "../../../source/many/Bytes.inl"
#include "../../../source/maps/TMap.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/many/Construct.inl"
#include "../../source/text/Text.inl"
#include "../../../source/many/Construct.inl"
#include "../../../source/text/Text.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/TEdit.inl"
#include "../../../source/TEdit.inl"
16 changes: 8 additions & 8 deletions include/Anyness/Many.hpp → include/Langulus/Anyness/Many.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/many/Many.inl"
#include "../../source/many/TMany.inl"
#include "../../source/maps/TMap.inl"
#include "../../source/text/Text.inl"
#include "../../source/many/Neat.inl"
#include "../../source/many/Construct.inl"
#include "../../source/many/Bytes.inl"
#include "../../source/verbs/Verb.inl"
#include "../../../source/many/Many.inl"
#include "../../../source/many/TMany.inl"
#include "../../../source/maps/TMap.inl"
#include "../../../source/text/Text.inl"
#include "../../../source/many/Neat.inl"
#include "../../../source/many/Construct.inl"
#include "../../../source/many/Bytes.inl"
#include "../../../source/verbs/Verb.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/maps/Map.inl"
#include "../../../source/maps/Map.inl"
10 changes: 5 additions & 5 deletions include/Anyness/Neat.hpp → include/Langulus/Anyness/Neat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/many/Neat.inl"
#include "../../source/many/Construct.inl"
#include "../../source/many/Bytes.inl"
#include "../../source/verbs/Verb.inl"
#include "../../source/text/Text.inl"
#include "../../../source/many/Neat.inl"
#include "../../../source/many/Construct.inl"
#include "../../../source/many/Bytes.inl"
#include "../../../source/verbs/Verb.inl"
#include "../../../source/text/Text.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/one/Own.inl"
#include "../../../source/one/Own.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/pairs/Pair.inl"
#include "../../../source/pairs/Pair.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/text/Path.inl"
#include "../../../source/text/Path.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/one/Ref.inl"
#include "../../../source/one/Ref.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/text/Text.inl"
#include "../../source/many/Bytes.inl"
#include "../../../source/text/Text.inl"
#include "../../../source/many/Bytes.inl"

Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
///
#pragma once
#include "Many.hpp"
#include "../../source/sets/Set.inl"
#include "../../../source/sets/Set.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/many/THive.inl"
#include "../../source/maps/TMap.inl"
#include "../../../source/many/THive.inl"
#include "../../../source/maps/TMap.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/maps/TMap.inl"
#include "../../../source/maps/TMap.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/pairs/TPair.inl"
#include "../../../source/pairs/TPair.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/sets/TSet.inl"
#include "../../../source/sets/TSet.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/text/Text.inl"
#include "../../source/maps/TMap.inl"
#include "../../../source/text/Text.inl"
#include "../../../source/maps/TMap.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/many/TTrait.inl"
#include "../../../source/many/TTrait.inl"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include "../../source/verbs/Verb.inl"
#include "../../../source/verbs/Verb.inl"
18 changes: 9 additions & 9 deletions source/Charge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ namespace Langulus::Anyness
Real = DefaultPriority
) noexcept;

NOD() constexpr bool operator == (const Charge&) const noexcept;
constexpr bool operator == (const Charge&) const noexcept;

NOD() constexpr Charge operator * (const Real&) const noexcept;
NOD() constexpr Charge operator ^ (const Real&) const noexcept;
constexpr Charge operator * (const Real&) const noexcept;
constexpr Charge operator ^ (const Real&) const noexcept;

NOD() constexpr Charge& operator *= (const Real&) noexcept;
NOD() constexpr Charge& operator ^= (const Real&) noexcept;
constexpr Charge& operator *= (const Real&) noexcept;
constexpr Charge& operator ^= (const Real&) noexcept;

NOD() constexpr bool IsDefault() const noexcept;
NOD() constexpr bool IsFlowDependent() const noexcept;
NOD() Hash GetHash() const noexcept;
constexpr bool IsDefault() const noexcept;
constexpr bool IsFlowDependent() const noexcept;
Hash GetHash() const noexcept;
void Reset() noexcept;

NOD() operator Text() const;
operator Text() const;
};

} // namespace Langulus::Anyness
13 changes: 10 additions & 3 deletions source/Config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#pragma once
#include <Core/Common.hpp>
#include <RTTI/Meta.hpp>
#include <Langulus/MetaOf.hpp>


#if defined(LANGULUS_EXPORT_ALL) or defined(LANGULUS_EXPORT_ANYNESS)
Expand All @@ -18,7 +17,7 @@

/// Enable memory manager
#if LANGULUS_FEATURE(MANAGED_MEMORY)
#include <Fractalloc/Allocator.hpp>
#include <Langulus/Fractalloc.hpp>
#else
#include "memory/NoAllocator.hpp"
#endif
Expand Down Expand Up @@ -149,3 +148,11 @@ namespace Langulus
} // namespace Langulus::Anyness

} // namespace Langulus

#if 0
#define VERBOSE_COMPARE(...) Logger::Verbose(__VA_ARGS__)
#define VERBOSE_COMPARE_TAB(...) const auto tab = Logger::Verbose(__VA_ARGS__, Logger::Tabs {})
#else
#define VERBOSE_COMPARE(...) LANGULUS(NOOP)
#define VERBOSE_COMPARE_TAB(...) LANGULUS(NOOP)
#endif
Loading
Loading