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

DSFMT needs a 64-bit interface #1556

Closed
ViralBShah opened this issue Nov 16, 2012 · 6 comments
Closed

DSFMT needs a 64-bit interface #1556

ViralBShah opened this issue Nov 16, 2012 · 6 comments
Labels
building Build system, or building Julia or its dependencies

Comments

@ViralBShah
Copy link
Member

DSFMT needs a 64-bit interface. Currently, it seems to use int for array sizes.

@StefanKarpinski
Copy link
Member

If we do add this, we should contribute the additions upstream if it's reasonable to do so.

@StefanKarpinski
Copy link
Member

Arguably one could also just use the 32-bit interface in a loop for 64-bit values that are large. That would be a Julia-only solution.

@ViralBShah
Copy link
Member Author

I will at least try patch DSFMT to use long instead of int. I think it should be reasonably simple to pull off, and we already patch DSFMT.

ViralBShah added a commit that referenced this issue Dec 20, 2012
RFC: 64-bit interfaces for various libraries

Close #1527 and #1556.
@ViralBShah
Copy link
Member Author

As of commit c78b184

julia> @time rand(2^33)
elapsed time: 53.37400007247925 seconds
8589934592-element Float64 Array:
 0.277725 
 0.717841 
 0.508466 
 0.781537 
 0.651427 
 0.471652 
 0.919684 
 0.918566 
 0.87167  
 0.995398 
 0.0112912
 0.856975 
 0.085894 
 0.773804 
 0.799451 
 ⋮        
 0.191464 
 0.504622 
 0.537639 
 0.672729 
 0.828075 
 0.263593 
 0.562722 
 0.423488 
 0.636193 
 0.459945 
 0.956286 
 0.757436 
 0.681872 
 0.83292  
 0.818928 

julia> a = ans;

julia> a[end]
0.8189275296311884

julia> a[end-1000]
0.1262249932227848

@StefanKarpinski
Copy link
Member

I have to say, I rather like the vertical ellipsis :-)

I guess this works, but I still don't get why we're not just calling the 32-bit interface in a loop. Is there some reason not to do that instead?

@ViralBShah
Copy link
Member Author

This was just quicker to do, rather than changing a whole bunch of dsfmt wrappers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies
Projects
None yet
Development

No branches or pull requests

2 participants