Ludovic 'Archivist'
3dpoint = std::reduce(vector.begin(), vector.end());
You need a reduction base as a third argument. If you mean not to parallelize the operation and implicitly mean operator+ as the reduction, I advise using accumulate instead
Anonymous
3dpoints results to be inf
Anonymous
ok maybe is this:
Anonymous
std::reduce(std::execution::par, vector.begin(), vector.end(), 3dpoint(0,0,0)) ?
Anonymous
in this case the fourth arguments ?
Ludovic 'Archivist'
std::reduce(std::execution::par, vector.begin(), vector.end(), 3dpoint(0,0,0)) ?
Some implementations do not ship with the parallel execution policy yet
Anonymous
Hi, in my case works
Ludovic 'Archivist'
But the 4th argument is correct
Anonymous
but, problem is the final result
Anonymous
it is correct? yes?
Ludovic 'Archivist'
However, you may want to provide a lambda as a reduction operation
Anonymous
3dpoint = std::reduce(std::execution::par, vector.begin(), vector.end(), 3dpoint(0,0,0)) ?
Anonymous
3dpoints has operator+ overloaded, then maybe lambda is not neccessary
Ludovic 'Archivist'
Also, the only case when + gives Nan are Nan+Anything Anything+Nan +inf + -inf -inf + +inf
Anonymous
yes, but I verified my vector
Anonymous
yes, but I verified my vector
3dpoint p; p = std::reduce(std::execution::par, vector.begin(), vector.end(), 3dpoint(0,0,0)) ?
Anonymous
final could be ok?
Ludovic 'Archivist'
yes, but I verified my vector
If you get Nan you did not verify well enough, the problem is not in the reduction
Ludovic 'Archivist'
Using a lambda could allow you to add assertions within it to see where does the issue rise
Anonymous
yes
Anonymous
true,is a good Idea
Anonymous
but a lambda with std::transform ?
Anonymous
Using a lambda could allow you to add assertions within it to see where does the issue rise
many thanks, my error was the third argument, that was absent
Anonymous
Ilya
It is latest one i guess.
then you don't deploy Qt itself, you make a package for you Linux distr and pack your app there, and that is it!
Ilya
Can i have the commands please😐 just started with qt
This is not question of Qt, this is commands of your Linux witch type I don't know
Anonymous
This is not question of Qt, this is commands of your Linux witch type I don't know
Alright! I need another help, how can i put google ads in my QT project?
Dima
Lol
Dima
people can’t google
Anonymous
people can’t google
Dude, i have tried before but was unable to find related thing😐
Dima
easy
Dima
use logic
Dima
webview + ad
Anonymous
webview + ad
Should i define it inside a label or what?
Anonymous
Atleast provide me reference to the help page😐
Ilya
People let us save World from another portion of shit in our heads! DO NOT TELL HIM!
Anonymous
😊
Dima
Yuh
klimi
nice!
Ander
Hi; If I have: char *mynum = "1234"; And I want to add 1 to "1234" to convert it to "1235" How can I do that?? Thanks
klimi
mynum[3] = "5"
Ander
mynum[3] = "5"
yes but the net time needs to be "1236" and then "1237"...
Ander
I am trying with mynum = (((mynum - '0') + 1) + '0'); but does not work.. any suggestions? Thanks.
Ander
Is it C or C++?
it C, but I have found a solution using atoi. Thank you
qwert
and why you need to do that so often, why not to have int?
MᏫᎻᎯᎷᎷᎬᎠ
Wow
︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎
Dima
Lol
Mouqueer
klimi
/warm keep me sad
Anonymous
anybody us GTK
Anonymous
or GTK+
klimi
Yeah
Anonymous
Yeah
is it the best option , i was thinking about learning it next to but a GUI to my projects
klimi
¯\_ (ツ) _/¯
Anonymous
Esha
May, I please know how is data structures and algorithms by narasimha karumanchi?
Swaroop
In this code when i am fixing the values of x and y at compile time then i am getting x= 31 and y= 21 But if i scan the values of x and y at run time then i am getting x= 11 and y= 21
Swaroop
Its on a 32bit linux system
ウサギ
Can anyone help me
dubug it and view the asm code. step by step. by yourself
Anonymous
gcc -o a -g a.c &&gdb a
ウサギ
stepping one line is over debugging 1000 lines, debugging one line is over writing 1000 lines, writing 1 line is over reading 1000 line.
Spirit
x = x++ + y++ should evaluate to x = x + y where ( x = 11, y = 21 ) therefore printf should show "32, 21" where x = 32 and y = 21?
Spirit
so : x = 10 + 20, ( x=30, y=20) x++ (x = 31, y=20) y++ (x = 31, y=21)
Ilya
mynum[3] = "5"
This is incorrect, wrong code.
Spirit
Exactly
thanks for the correction :)