Conversation
| for(size_t i = 0; i < N/2; ++i){ | ||
| X[i + N/2] = tmp[i]; | ||
| } | ||
| void cooley_tukey(double complex *X, const size_t N) { |
There was a problem hiding this comment.
This N is the only parameter which is const, which is quite odd.
chapters/FFT/code/c/fft.c
Outdated
| } | ||
| } | ||
| void iterative_cooley_tukey(double complex *X, size_t N) { | ||
| int stride; |
There was a problem hiding this comment.
why is stride defined here, as opposed to inside the for loop?
There was a problem hiding this comment.
I dont know why I did that.
chapters/FFT/code/c/fft.c
Outdated
| } | ||
| void iterative_cooley_tukey(double complex *X, size_t N) { | ||
| int stride; | ||
| double complex v,w; |
There was a problem hiding this comment.
same with v and w; you can define these variables inside the for loop.
chapters/FFT/code/c/fft.c
Outdated
| } | ||
| int main() { | ||
| srand(time(NULL)); | ||
| const size_t N = 64; |
There was a problem hiding this comment.
you probably want to use a #define here; otherwise, the line after it is defining three VLAs.
| for (size_t i = 0; i < grp_size; ++i) { | ||
| printf("preferences of man %zu \n", i); | ||
| for(size_t j = 0; j < grp_size; j++){ | ||
| for (size_t j = 0; j < grp_size; j++) { |
There was a problem hiding this comment.
you switch i++ to ++i, but not j++ to ++j.
There was a problem hiding this comment.
I missed that, thanks.
|
Thanks for this cleanup! |
|
Great! So I'll wait for a few more small scale changes before merging this one. Thanks! |
|
Alright, great! Thanks again! |
No description provided.