From 9a56a63c610e8ab211730c1e32c9dc9f8f075cda Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sat, 18 Nov 2023 23:01:29 +0000 Subject: [PATCH] fix: omp typo, which makes this now go faster --- C/alt/05-refactor-split-array/out/samples | Bin 22688 -> 22688 bytes C/alt/05-refactor-split-array/samples.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/C/alt/05-refactor-split-array/out/samples b/C/alt/05-refactor-split-array/out/samples index a06fd7e01b4dcfbe5c4e4bd18e04fa28185db706..0c7c222a691a6a0da00145c22eec6a53c3c84441 100755 GIT binary patch delta 5543 zcmZ`-4^&jwnZNHb12Z7=hktJ-{KwItO=U(gKn3K%C~p#s8U)E!qt-}uOR}0u)x-o+ zG;tOuEB#J-$ZmHJ&FMC}O_Nf(8{3m6prYig$pPECCMFG?z5Dh z-gD-C_x`>=_q*Ty?swmto?fY^S32O4SeN%@dru-WT2I$oMTypo*ua`WDbhT3Uwmw6 zQs#<{B@oWatB8&Bmi;vylVf8SJs~M>zmW0^DL);OE+ksG5j2ZL|0>^;|MyId3R9zG zk6V|XlRFFBo03{*nF= zzl)Y7EWg`=0K_qwSujZgsLgnCXYCkqD&e^ql*i1E-|)=Y5Vo^3q0KQW5hO|-7UsX8RIzCh%s*x=6w}Z>;>EI-C}2$e}j-u+p;B@F)Mpej9YKx zeA%$i_07$)@d4UsDjsS06^i{a89j8!RwE_Sr#8hqgG-7wwmjD18IVfZb|t_gZMM7> zv7Qw~WRn3j39ST-BznxQ&~E#Tr5@#fL zPeGHYB2n>T^|#u=DO?9V2%Q$_9G-%@=-+|<1nAHdG=<(sRHU@Nu36u+{>W8eD_G3f zHGS61zPYYMX(4*QuVl=b8)R(Unezq4$jb+ygT1{D=N%66VvwSEBV_gLWLV z1^U;jYmPQMbN3i=BUfrh!|4>Rlf2F#6&`5l>Ax;#Y~lbsdHt?#ZflkjPzpMS(Bx8KI*FLocXMJVF(po$lJNLS^r@e!N7wu5}FBw74vvwy4Et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yg2W{qN{D8Em?7 zOoY)9DvA^~f22#9|Ip*-x))|XCi0N5AKPP!J_Qd;@T80)ei=(RXvW4cRNJu+Wj1bF z@^l+0cp)6d^W=#wXA!zZ`sep@{`5Bpo1O_tWtp&fik4S;{im?`0(`5AJgM#AUPgO40eC_Flq za(fvYP|Q)l%umV^uQZ20qxTD6HZiHyiv*gh4Ll=>i=)N9E$|jGLZeV_)?>EP8ARTz zxBrJfi%!CxXJBlWes9DVxjiffm(YDJv~H=_;>Y3z=&U2(J#2 z{IkM~U+#PiE^!!*y!@B2@5xUZ>UA8=mju36&1z=1>1R*tq3?JOdj^y4x%5(4Tv$2<=X8U-Y%; zYfy~Aco{e)`s&1oBPS#Czo$L$y-bJhUeNW;-OWx!wJvI@4ZD}&XYuXDMLi^Sk6 zNh=C%Mxpdk>56$2UJ<4PD_l0CtcK|I74z=gnk9>pqd3(iJ&-0zMU-AYOEQsCKhJhd LT&&qhM*jZ-`4>-Z diff --git a/C/alt/05-refactor-split-array/samples.c b/C/alt/05-refactor-split-array/samples.c index d84eebcf..e128518f 100644 --- a/C/alt/05-refactor-split-array/samples.c +++ b/C/alt/05-refactor-split-array/samples.c @@ -192,7 +192,7 @@ void paralellize(float (*sampler)(uint32_t* seed), float* results, int n_threads *seeds[i] = i + 1; // xorshift can't start with 0 } - #pragma omp parallelz private(i, sample_index, split_array_length) + #pragma omp parallel private(i, sample_index, split_array_length) { #pragma omp for for (i = 0; i < n_threads; i++) {