Skip to content

Fixing post-load type-casts#623

Merged
ashvardanian merged 2 commits intomainfrom
main-dev
Jun 12, 2025
Merged

Fixing post-load type-casts#623
ashvardanian merged 2 commits intomainfrom
main-dev

Conversation

@ashvardanian
Copy link
Copy Markdown
Contributor

No description provided.

postmath added 2 commits June 12, 2025 16:12
According to https://eel.is/c++draft/lex.name#3, symbols that
include double underscores and symbols in the global namespace
that start with an underscore are "reserved for use by C++
implementations and shall not be used otherwise".
As I understand the standards, that means it's technically UB
to use such symbols. This change renames the symbol to a legal
one.
In both `load_from_stream` and `view`, we initialize `cast_buffer_`
to hold enough slots for a certain number of threads. This number
of threads is currently `available_threads_.size()`.
However, `available_threads_` gets replaced later in both methods,
specifically updating the number of threads to `old_limits.threads()`.
This change makes the initialization statement use that value instead.
@ashvardanian ashvardanian merged commit e9c562f into main Jun 12, 2025
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants