Comments (3)
The problem might be in CO_AutoCorr.c
, there are two definitions of the complex data type which depends on the compiler.
#if defined(__GNUC__) || defined(__GNUG__)
typedef double complex cplx;
#elif defined(_MSC_VER)
typedef _Dcomplex cplx;
There could be an implementation bug which needs to be resolved
from catch22.
Hi @imraniac,
thank you for taking a look into the code. You are right that this compiler-depencency is the source of differences between platforms.
Unfortunately, it is to our knowledge unavoidable to branch on the type of compiler because the implementation of complex numbers differs between GCC (Linux) and the MS Visual Studio compiler (Windows). The complex datatype and the associated methods are different between these compilers. Therefore, no single, identical version of the code works for both. I.e. if you write the code to work for GCC, it won't run on Windows and vice versa. The only solution so far to make catch22 compile using either compiler, are these preprocessor-branches you identified and two different versions of the C-implementation, one for each compiler.
And apparently, some complex number computations differ between the two catch22 versions. The differences most likely affect the FFT, accordingly the co_autocorr
function, and possibly other functions.
Suggestions on how to handle the complex data-type in a unified way across platforms are very welcome! Otherwise the two different branches of the C-implementation have to become better aligned to behave exactly identically.
Carl
from catch22.
This issue should now be fixed in release v0.2.0 onwards.
from catch22.
Related Issues (20)
- Correction in CO_Histogram_AMI_even_2_5 implementation HOT 3
- Support for GNU Octave HOT 2
- Python 3. Pandas rolling apply
- Failed to install HOT 7
- wrap_Python setup.py should add "extra_compile_args = ['-std=c99']" (GCC 7.5.0)
- Failed to install catch22
- Segmentation Faults on Small Datasets HOT 4
- Installation failure: `forβ loop initial declarations are only allowed in C99 mode`
- CO_f1ecac overestimating by 1
- Python package version mismatch HOT 1
- Why catch22-0.2.0 got deleted from pypi HOT 5
- Generating a shared library for the C implementation (and using that to build pycatch22 etc.) HOT 3
- 14 * possible use of wrong binary operator ? HOT 1
- Please clarify GPL version HOT 6
- What is the shortest time series on which Catch22 could be computed? HOT 1
- Add `catch22` to `conda-forge` HOT 1
- cannot find -lmsvcr140 HOT 1
- Python 3. Dead kernel after catch22 usage HOT 5
- Anaconda Python 3 pip install not working HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from catch22.