Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tensor.Op.Random operations and Tensor.Gen.Random to assist. #11

Merged
merged 2 commits into from
Apr 5, 2023

Conversation

jemc
Copy link
Contributor

@jemc jemc commented Apr 5, 2023

These new operations can be used to generate pseudo-random deterministic numbers in a uniform distribution,
using seeded parallel random number generation algorithms.

This commit also adds Tensor.Op.Add because it was required to support certain parts of the seeding process.

@jemc jemc self-assigned this Apr 5, 2023
These new operations can be used to generate pseudo-random
deterministic numbers in a uniform distribution,
using seeded parallel random number generation algorithms.

This commit also adds `Tensor.Op.Add` because it was
required to support certain parts of the seeding process.
Prior to this commit it was possible to run into
issues with invalid characters in operation names
because these Savi `String`s were being sometimes
allocated without a null terminator (which is
normal and okay, until you try to pass it into
a C function that is expecting a null-terminated string.

The right fix is to use `cstring` instead of `cpointer`
in these cases.
@jemc jemc merged commit 126fadf into main Apr 5, 2023
@jemc jemc deleted the add/random-ops branch April 5, 2023 13:50
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.

None yet

1 participant