IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::detail Namespace Reference

Namespaces

namespace  ct_tests
namespace  hashmap
namespace  internal
namespace  murmur2_hash
namespace  murmur3_hash
namespace  numeric
namespace  stringid_type_v3

Classes

struct  ColorData
struct  ColorData< ColorFormat::LinearRGB >
struct  ColorData< ColorFormat::LinearRGBu8 >
struct  ColorData< ColorFormat::OkLAB >
struct  ColorData< ColorFormat::OkLCH >
struct  ColorData< ColorFormat::OkLCHu8 >
struct  ColorData< ColorFormat::StandardRGB >
struct  DebugAllocatorAPI
struct  ExtractMemberType
struct  ExtractMemberType< ValueType Owner::* >
struct  ExtractTemplateType
struct  ExtractTemplateType< TType< ExtractedType > >
struct  LogLocation
struct  OkLCH_HueCusp
 Holds information where the 'lightness' and 'chroma' are at the highest point of the OkLCH color curve. More...
class  RCPassKey
class  RefCounted
struct  ShardName
struct  ShardPayload
struct  TaskDebugAllocator
struct  TimeTypeTraits

Concepts

concept  HasMemberValue
concept  OnlyMemberValue
concept  HasAliasTypeTag

Typedefs

using nvalue_base_utype = ice::usize::base_type
using nvalue_base_stype = ice::isize::base_type
template<ice::TimeType T0, ice::TimeType T1>
using TTHighestPrecisionType = typename TimeTypeTraits<T0, T1>::HighestPrecision
template<ice::TimeType T0, ice::TimeType T1>
using TTLowestPrecisionType = typename TimeTypeTraits<T0, T1>::LowestPrecision

Functions

template<typename K, typename V, typename Pred>
auto qsort_partition (ice::Span< K > keys, ice::Span< V > &values, Pred &&pred, ice::i32 left, ice::i32 right) noexcept -> ice::i32
template<typename Pred, typename Key, typename... Values>
auto qsort_partition_many (Pred &&pred, ice::i32 left, ice::i32 right, ice::Span< Key > keys, ice::Span< Values >... values) noexcept -> ice::i32
template<typename K, typename Pred>
auto qsort_partition_indices (ice::Span< K > keys, ice::Span< ice::u32 > &indices, Pred &&pred, ice::i32 left, ice::i32 right) noexcept -> ice::i32
template<typename K, typename V, typename Pred>
void qsort (ice::Span< K > keys, ice::Span< V > values, Pred &&pred, ice::i32 left, ice::i32 right) noexcept
template<typename Pred, typename Key, typename... Values>
void qsort_many (Pred &&pred, ice::i32 left, ice::i32 right, ice::Span< Key > keys, ice::Span< Values >... values) noexcept
template<typename K, typename Pred>
void qsort_indices (ice::Span< K > keys, ice::Span< ice::u32 > indices, Pred &&pred, ice::i32 left, ice::i32 right) noexcept
consteval auto nvalue_min_value () noexcept -> ice::detail::nvalue_base_utype
consteval auto nvalue_max_value () noexcept -> ice::detail::nvalue_base_utype
constexpr char _iceshard_constexpr_assert (bool v) noexcept
template<typename T>
requires HasShardPayloadID<T>
constexpr auto shard_payload (T payload) noexcept -> ice::detail::ShardPayload
template<typename T>
requires HasShardPayloadID<T>
constexpr auto shard_value (ShardPayload payload) noexcept -> T
void assert (ice::String condition, ice::String message, fmt::format_args args, ice::detail::LogLocation location) noexcept
void terminate () noexcept
void log (ice::LogSeverity severity, ice::LogTag tag, ice::String message, fmt::format_args args, ice::detail::LogLocation location) noexcept
void log (ice::LogSeverity severity, ice::LogTag tag, ice::I18NString message, fmt::format_args args, ice::detail::LogLocation location) noexcept
constexpr auto log_make_args () noexcept
template<typename... Args>
constexpr auto log_make_args (Args &&... args) noexcept
constexpr auto get_tag (ice::LogTag tag) noexcept
constexpr auto get_tag (ice::LogTagDefinition const &tag_def) noexcept
template<typename T>
auto output_result_task (ice::Task< T > task, T &out_result) noexcept -> ice::Task<>
template<typename T>
auto output_result_task (ice::TaskExpected< T > task, ice::Expected< T > &out_result) noexcept -> ice::Task<>
bool try_set_canceled_state (std::atomic< ice::TaskState > &state) noexcept
constexpr auto linear_to_srgb (ice::f32 x) noexcept -> ice::f32
constexpr auto srgb_to_linear (ice::f32 x) noexcept -> ice::f32
constexpr auto from_oklab_to_lrgb (ice::math::vec3f from) noexcept -> ice::math::vec3f
 from: https://bottosson.github.io/posts/oklab/
constexpr auto compute_max_saturation (ice::f32 a, ice::f32 b) noexcept -> ice::f32
 Compute max saturation for sRGB.
constexpr auto find_cusp (ice::f32 a, ice::f32 b) noexcept -> ice::detail::OkLCH_HueCusp
 Finds L_cusp and C_cusp for a given 'a' and 'b' values of OKLAB color.
constexpr auto find_cusp_ch (ice::f32 chroma, ice::rad hue) noexcept -> ice::detail::OkLCH_HueCusp
 Finds L_cusp and C_cusp for a given 'a' and 'b' values of OKLAB color.
constexpr auto find_gamut_intersection (ice::detail::OkLCH_HueCusp cusp, ice::f32 L1, ice::f32 C1, ice::f32 L0) noexcept -> ice::f32
template<ice::concepts::InterfaceType... Interfaces>
auto interface_select_helper (auto *ptr, ice::StringID_Arg id) noexcept -> ice::Expected< void * >

Detailed Description

Copyright 2022 - 2025, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

Copyright 2022 - 2026, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

Copyright 2025 - 2026, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

Copyright 2026 - 2026, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

Typedef Documentation

◆ nvalue_base_stype

◆ nvalue_base_utype

◆ TTHighestPrecisionType

template<ice::TimeType T0, ice::TimeType T1>
using ice::detail::TTHighestPrecisionType = typename TimeTypeTraits<T0, T1>::HighestPrecision

◆ TTLowestPrecisionType

template<ice::TimeType T0, ice::TimeType T1>
using ice::detail::TTLowestPrecisionType = typename TimeTypeTraits<T0, T1>::LowestPrecision

Function Documentation

◆ _iceshard_constexpr_assert()

char ice::detail::_iceshard_constexpr_assert ( bool v)
constexprnoexcept

◆ assert()

void ice::detail::assert ( ice::String condition,
ice::String message,
fmt::format_args args,
ice::detail::LogLocation location )
noexcept

◆ compute_max_saturation()

auto ice::detail::compute_max_saturation ( ice::f32 a,
ice::f32 b ) -> ice::f32
constexprnoexcept

Compute max saturation for sRGB.

Finds the maximum saturation possible for a given hue that fits in sRGB. Saturation here is defined as 'S = C/L', 'a' and 'b' must be normalized so that 'a^2 + b^2 == 1'

Note
Implementation copied from: https://bottosson.github.io/posts/gamutclipping/

◆ find_cusp()

auto ice::detail::find_cusp ( ice::f32 a,
ice::f32 b ) -> ice::detail::OkLCH_HueCusp
constexprnoexcept

Finds L_cusp and C_cusp for a given 'a' and 'b' values of OKLAB color.

Argument 'a' and 'b' must be normalized so a^2 + b^2 == 1

◆ find_cusp_ch()

auto ice::detail::find_cusp_ch ( ice::f32 chroma,
ice::rad hue ) -> ice::detail::OkLCH_HueCusp
constexprnoexcept

Finds L_cusp and C_cusp for a given 'a' and 'b' values of OKLAB color.

Argument 'a' and 'b' must be normalized so a^2 + b^2 == 1

◆ find_gamut_intersection()

auto ice::detail::find_gamut_intersection ( ice::detail::OkLCH_HueCusp cusp,
ice::f32 L1,
ice::f32 C1,
ice::f32 L0 ) -> ice::f32
constexprnoexcept
Note
Implementation copied from: https://bottosson.github.io/posts/gamutclipping/

◆ from_oklab_to_lrgb()

auto ice::detail::from_oklab_to_lrgb ( ice::math::vec3f from) -> ice::math::vec3f
constexprnoexcept

◆ get_tag() [1/2]

auto ice::detail::get_tag ( ice::LogTag tag)
constexprnoexcept

◆ get_tag() [2/2]

auto ice::detail::get_tag ( ice::LogTagDefinition const & tag_def)
constexprnoexcept

◆ interface_select_helper()

template<ice::concepts::InterfaceType... Interfaces>
auto ice::detail::interface_select_helper ( auto * ptr,
ice::StringID_Arg id ) -> ice::Expected< void * >
noexcept

◆ linear_to_srgb()

auto ice::detail::linear_to_srgb ( ice::f32 x) -> ice::f32
constexprnoexcept

◆ log() [1/2]

void ice::detail::log ( ice::LogSeverity severity,
ice::LogTag tag,
ice::I18NString message,
fmt::format_args args,
ice::detail::LogLocation location )
noexcept

◆ log() [2/2]

void ice::detail::log ( ice::LogSeverity severity,
ice::LogTag tag,
ice::String message,
fmt::format_args args,
ice::detail::LogLocation location )
noexcept

◆ log_make_args() [1/2]

auto ice::detail::log_make_args ( )
constexprnoexcept

◆ log_make_args() [2/2]

template<typename... Args>
auto ice::detail::log_make_args ( Args &&... args)
constexprnoexcept

◆ nvalue_max_value()

auto ice::detail::nvalue_max_value ( ) -> ice::detail::nvalue_base_utype
constevalnoexcept

◆ nvalue_min_value()

auto ice::detail::nvalue_min_value ( ) -> ice::detail::nvalue_base_utype
constevalnoexcept

◆ output_result_task() [1/2]

template<typename T>
auto ice::detail::output_result_task ( ice::Task< T > task,
T & out_result ) -> ice::Task<>
noexcept

◆ output_result_task() [2/2]

template<typename T>
auto ice::detail::output_result_task ( ice::TaskExpected< T > task,
ice::Expected< T > & out_result ) -> ice::Task<>
noexcept

◆ qsort()

template<typename K, typename V, typename Pred>
void ice::detail::qsort ( ice::Span< K > keys,
ice::Span< V > values,
Pred && pred,
ice::i32 left,
ice::i32 right )
inlinenoexcept

A qsort implementation with tail call optimization (partial).

Note
Implementation base on articles: http://www.algolist.net/Algorithms/Sorting/Quicksort https://www.geeksforgeeks.org/quicksort-tail-call-optimization-reducing-worst-case-space-log-n/

◆ qsort_indices()

template<typename K, typename Pred>
void ice::detail::qsort_indices ( ice::Span< K > keys,
ice::Span< ice::u32 > indices,
Pred && pred,
ice::i32 left,
ice::i32 right )
inlinenoexcept

◆ qsort_many()

template<typename Pred, typename Key, typename... Values>
void ice::detail::qsort_many ( Pred && pred,
ice::i32 left,
ice::i32 right,
ice::Span< Key > keys,
ice::Span< Values >... values )
inlinenoexcept

◆ qsort_partition()

template<typename K, typename V, typename Pred>
auto ice::detail::qsort_partition ( ice::Span< K > keys,
ice::Span< V > & values,
Pred && pred,
ice::i32 left,
ice::i32 right ) -> ice::i32
inlinenoexcept

◆ qsort_partition_indices()

template<typename K, typename Pred>
auto ice::detail::qsort_partition_indices ( ice::Span< K > keys,
ice::Span< ice::u32 > & indices,
Pred && pred,
ice::i32 left,
ice::i32 right ) -> ice::i32
inlinenoexcept

◆ qsort_partition_many()

template<typename Pred, typename Key, typename... Values>
auto ice::detail::qsort_partition_many ( Pred && pred,
ice::i32 left,
ice::i32 right,
ice::Span< Key > keys,
ice::Span< Values >... values ) -> ice::i32
inlinenoexcept

◆ shard_payload()

template<typename T>
requires HasShardPayloadID<T>
auto ice::detail::shard_payload ( T payload) -> ice::detail::ShardPayload
constexprnoexcept

◆ shard_value()

template<typename T>
requires HasShardPayloadID<T>
auto ice::detail::shard_value ( ShardPayload payload) -> T
constexprnoexcept

◆ srgb_to_linear()

auto ice::detail::srgb_to_linear ( ice::f32 x) -> ice::f32
constexprnoexcept

◆ terminate()

void ice::detail::terminate ( )
noexcept

◆ try_set_canceled_state()

bool ice::detail::try_set_canceled_state ( std::atomic< ice::TaskState > & state)
inlinenoexcept