From ce37306f657d11e3a4f56b1b5a063f5f4daa792a Mon Sep 17 00:00:00 2001 From: "quentin.perret" Date: Mon, 13 Jun 2022 17:24:53 +0200 Subject: [PATCH] thread calcul ok --- Code-C/getArray.c | 2 +- Code-C/main | Bin 24600 -> 24600 bytes Code-C/main.c | 7 ++++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Code-C/getArray.c b/Code-C/getArray.c index 7389042..9b78b07 100644 --- a/Code-C/getArray.c +++ b/Code-C/getArray.c @@ -73,7 +73,7 @@ long **getRawDataArray(char* rawDataFileName , int N , int M){ p = get(N, M); fillArrayWithRawData(rawDataFileName,p ,N, M); if(checkArrayFullyFill(p,N,M)){ - clearRawData(N); + //clearRawData(N); return p; } else{ diff --git a/Code-C/main b/Code-C/main index 31dc9ce46809548b4d233859cd21ed2c5066e57b..942736ddaf9d6663f5a37cdb8b2c96efb169fe37 100755 GIT binary patch delta 2354 zcmY*a4Nz276uuXI=m@wgu)-p^tP7-|;ZKN~X5{SfKvAoqBD187Y^KzH$eD_W!0h?l zWI9<|nK?E6P7}3FIy7U8nnF#wHD=pC&S<_wb3;m|sMmMijb_`KJ>R?M`_8%No_p_m z+aq#&M0OlY%3S4{?;gJ+qdhs}_^$6q-hcM}BcEIvwvy(!WKr0kzDkqHv?Xh&t1MfH z2G`{72HmwbV(p?i*?R5|S&2S<(6;+sHv}X7E_d1idLjEud64e)E=u?OVcTZyE4mpR zG>+@WVJnXgdwo;eFWREbEe+7h1t1^jd+~kj{(-|-!V;VQ%p_Kz^Zvl^_)_@!m2A+Wd<#? z_N3u9gD3Uv`y{JS?X@(JvwGnVP<84mFi8cD;=osbbJE9E`n{~GQmXGVog&TytVikD z36s5>n7vN1&nxyNW*1UyLLg@av-OI-MX{@y9q}7^a`U}2n7&KVg^Dg_x`&qLPAW;} zGXB@h0g#;!Dt#=&DdlT`^)Nl3du7gB%x+R_vtrwr4Ghqo6AQ?j=T95zcUm&YJ&03f zUWvDWgPv1CR=Sh&9KhN_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X?%*=^iv)X(NKL$&9(xl$WBI_D znj2=$Ud4*xFzYAV#zk;EFzVQBLNrsafH4E3SoLR}>u<}Dlb@c%3phUZW)#UQEb@;} zJ#oplTVc@}8jaVVX@jS!eN!YvYnKdbUs8YGFYB)-Iu_Q0kYe{^mmW7$pN7QLE=(6< z&e5iau?aD5=JOYA`?$6N96zR(aKlJq0FiT4S|AD^MQvuUuIAlTkH>5H3$feacTuS*`!D4Pq-9E_os7pJ+O0z5qFjHL|lO|Gf zL7F>d+-cpwmjQODT|c0$r^t(}-S-5BoqAy?p?ULp+wP4M!uzdl$ABF`*G)pCprRBQ1l9r5P`3%# z0^9-o2-pF<3hV{W#E!&(dx5SALd?QOmjeF`tOK3{ZUXMdSGWV{!?)WpLEI@G!Jrq3 zf8a0<15;zRouvuU2&@2h0~>%kZj{G>U;f*+Ujn{{{&xWjJ8Nf>^gqOJw{WtnEpAcL z#JIJSZjR@K5Lx)G!DqdjWSLLqksomvEkyi=8WFEk3*yVvjyOo&Wj?=l!M5je=?%9g zW#%}cLq3wf^2s~MkGP!{B92lcVgq>7K{RPUVhNop&-MQmEod7*b6krvHP8GgT2tAXJbR-q=TS@5Wf`E&#y+{5+|^aG zff}o;+>^4oR)`Y{#8GU=6fs$pQ+M?ixsvA8RLQrgr6yf|OuI3zpn;k#GEDW0OXOD+ zUR>h$@l1Fs6o?e`mmN;#t3(_9W${LNo~oDlwJ6JM%VuU D7QJhw diff --git a/Code-C/main.c b/Code-C/main.c index bccc3f9..2aa513f 100644 --- a/Code-C/main.c +++ b/Code-C/main.c @@ -23,11 +23,11 @@ double invTimeBandWidth = 0; void *threadCalcul(void *vargp){ Pqueue rawDataQueue = firstRawDataQueue; + char* fileName; while(rawDataWriteFlag){ while(queueGetNextE(rawDataQueue) != NULL){ - char* fileName = queueGetTabChar(rawDataQueue); - //queuePrintE(rawDataQueue); - printf("%s\n",fileName); + rawDataQueue = queueGetNextE(rawDataQueue); + fileName = queueGetTabChar(rawDataQueue); power(fileName,nRow,nCol,period,invTimeBandWidth); /*remove(queueGetTabChar(rawDataQueue)); rawDataQueue = queueRmFrstE(rawDataQueue);*/ @@ -36,6 +36,7 @@ void *threadCalcul(void *vargp){ } int main(int argc , char** argv){ + rawDataWriteFlag = true; period = 1 / freqEch;