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

SF#397 PDL::FFT not 64bit integer safe (and more) #147

Closed
devel-chm opened this issue Sep 6, 2015 · 2 comments
Closed

SF#397 PDL::FFT not 64bit integer safe (and more) #147

devel-chm opened this issue Sep 6, 2015 · 2 comments

Comments

@devel-chm
Copy link
Member

For complete 64bit index support we'll need to ensure that all the existing modules do the right thing when computing with large PDL_Indx offsets. This is specifically a problem for code that assumes that an int is the largest integer data type. TODO:

  • write test to determine if 64bit safe
  • add runtime checks with warnings/die if too big values are passed to non-supporting routine
  • convert to support PDL_Indx type (can handle either 32bit or 64bit depending on platform)

It would be nice if we could implement a common check routine that could be added to the relevant modules.

@devel-chm
Copy link
Member Author

Aside from the automatic warnings on out-of-range inputs, the initial focus for the 64bit PDL_Indx support will be in the Basic and Core modules.

@mohawk2
Copy link
Member

mohawk2 commented Dec 29, 2021

PDL::FFT needed a couple of int changed to size_t. A more serious problem was its lack of thread-safety due to global malloc-ed memory-chunks, but C99 variable-length arrays (or with factorize, just pass it a stack-allocated fixed-size array) fixed it.

@mohawk2 mohawk2 closed this as completed Dec 29, 2021
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

No branches or pull requests

2 participants