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

Uniform randomizing function respects given range #529

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

IvanaGyro
Copy link
Collaborator

This change fixes the problem that the uniform random number generator ignores the given lower bound and higher bound when the view types (Storage, Tensor, and UniTensor) are assigned on the GPU.

C's complex numbers, C++'s complex numbers and CUDA's complex numbers
have the same memory layout. It's safe to access the memory via the
pointer of `std::complex` if the memory block can be access by the CPU.
This change fixes the problem that the uniform random number generator
ignores the given lower bound and higher bound when the view types
(Storage, Tensor, and UniTensor) are assigned on the GPU.
@IvanaGyro
Copy link
Collaborator Author

Some the helper classes for manipulating types are duplicated with #490. This PR doesn't base on #490, so this PR implement them again. I will integrate them after merging these two PRs.

@IvanaGyro IvanaGyro added the bug Something isn't working label Dec 4, 2024
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.

Project coverage is 17.63%. Comparing base (672b7e9) to head (fe06e86).
Report is 6 commits behind head on dev-master.

Files with missing lines Patch % Lines
src/random/uniform_.cpp 0.00% 17 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           dev-master     #529      +/-   ##
==============================================
+ Coverage       17.58%   17.63%   +0.04%     
==============================================
  Files             211      211              
  Lines           44733    44749      +16     
  Branches        14941    14950       +9     
==============================================
+ Hits             7868     7893      +25     
+ Misses          32751    32734      -17     
- Partials         4114     4122       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IvanaGyro IvanaGyro merged commit 4675b7e into dev-master Dec 5, 2024
4 checks passed
@IvanaGyro IvanaGyro deleted the uniform-respect-range branch December 5, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants