« first day (236 days earlier)      last day (4695 days later) » 

10:00 AM
fakk = FAQ
 
I have a class with a definition

class A {
...
private:
vector<T*> A::viewports;
...
}

Then I have a constructor in the .cpp and when I call that constructor, the size of that vector is some big magical number. What's up?
 
What up!
You sure it's magical?
 
:)
viewports = [266338304](...,...)
you need a wizard to get a number like that..
 
same number every time?
 
umm.. lemme check
yup
The constructor gets a vector of the same type as a parameter and I would like to copy that vector to the member vector.
but just doing a copy

viewports = vports;

gives me..

viewports = [...]()
(expression cannot be evaluated stuff when I take a closer look in VS)
vports looks just fine.. I just don't understand what I should do to make that viewports member appear an empty well initialized vector.
 
10:10 AM
@FredOverflow What.
YOU BROKE OUR WONDERFUL TOPIC.
 
Yeah, I'm like that..
 
Those weren't boxes, those were snowmen. You heartless bastard, you've killed them all. ;(
 
@CatPlusPlus it needs more weird unicode characters!
room topic changed to Lounge<C++>: The current room topic *sucks*
woo, self-referential
 
Woo, food.
And somewhat more real one for that.
 
@CatPlusPlus more real food?
 
sbi
10:14 AM
@MartinhoFernandes It was too regular to be Perl.
 
@jalf Yeah. I mean, half of it still made from magic instant-soup powder, but the other half is only half-made pre-packaged stuff!
I suck at cooking, in other words.
It could've been valid APL. You never know.
 
I blew it, because I suck at it.
 
Everything sucks.
 
According to the law of gravity you may have point there.
 
Oh my, we're living in a giant vacuum cleaner.
I wonder if it goes up to ludicrous speed.
 
sbi
10:18 AM
@CatPlusPlus Do women suck?
 
@72con you doing something like this? codepad.org/acpUHewX
 
@sbi No idea.
 
@sbi You mean in the good way or in the bad way?
 
sbi
@CatPlusPlus Never seen one? :)
@StackedCrooked Isn't that just two aspects of the same thing?
 
0
A: if/else statement in SSE intrinsics

FredOverflowYou can get rid of the if/else entirely. Back in the days when I produced MMX assembly code, that was a common programming activity. Let me start with a series of transformations on the "false" statement: c >>= 1; c = c >> 1; c = 0 ^ (c >> 1); Why did I introduce the exclus...

Yay, bit-twiddling :)
 
sbi
10:21 AM
@FredOverflow Why do you bore us with programming problems? Isn't that what SO proper is for?!
 
It's not a problem, it's a solution. Now we can get back to sex!
 
yay
 
sbi
@FredOverflow You used The Word. I'm waiting for Miss to pop in any second now.
 
@72con codepad.org/JtESpzS1 this gives me 2. What are you doing in your code?
 
Yay, gender ambiguities again!
 
10:29 AM
Meh, when will this bloody day end. I want to go to sleep. :/
 
@CatPlusPlus You could have ended it like yesterday.
That would have been the smart move.
 
@MartinhoFernandes Yeah, but then I wouldn't have that crappy assembly crap done.
Thankfully it's a last one.
 
It was due today?
Some of my most successful assignments were completed the night before the deadline, with heavy doses of caffeine.
 
hi all
 
Well, it was night before deadline, except no caffeine. I don't like it.
 
10:34 AM
It does not help you think. Just staying awake.
 
room topic changed to Lounge<C++>: The next room topic is going to be awesome!
 
It actually hurts my thinking process.
 
Xeo
room topic changed to Lounge<C++>: Xeo
Xeo == awesome.
 
@Xeo Well played.
 
We're all in agreement.
 
10:36 AM
ouh bit shifting and SSE :)
 
sbi
I didn't do it. :)
 
@MartinhoFernandes yeah, but being asleep tends to hurt the thinking process even more
 
sbi
@Xeo You did prove @Fred wrong!
 
What? Is it "Sleep Deprivation Day" today?
 
Xeo
@MartinhoFernandes Sounds good, I'm in.
 
sbi
10:39 AM
@jalf Actually sleeping helps the thinking process. Only just afterwards.
 
@sbi yeah, but on the night before a deadline, "afterwards" might as well mean "never"
 
End of semester. Every second day is sleep deprivation day.
 
oof, fun fun
 
sbi
@jalf Of course, the night before deadline, it's too late. :)
 
BIU
our deadlines are midnight...though last week we got an extension until 7AM. That was a fun night...
 
10:48 AM
I have a deadline every minute of every day to get some work done by the next minute :)
 
And you repeatedly miss it, right?
 
@MartinhoFernandes at times :(
 
remember the victories then!
 
yes :) I just worked for 55 minutes straight, that's victory
:)
 
isn't that 55 victories?
 
10:50 AM
humm about sse did anybody try out intels opencl sdk?
 
oh yes, math fail
 
Better: A 55-victory streak.
 
That should automatically transform open cl code into multi threaded code which uses sse
 
what does mmx have to do with opencl?
oh
But if you're writing opencl anyway, why would you want to run it on the cpu? It's designed to work on gpu's, after all
 
24 CPU cores (probably more like 4, but...) versus bazillions of GPU pipelines. Hmm.
 
10:51 AM
seems kind of pointless, except maybe for ease of debugging
 
oh hai guise
 
oh hai
 
exam went good
 
Did you remember the JavaScript grammar? :P
 
enough, I think
 
10:58 AM
good as in "I survived", or "I aced it"?
 
but there wasn't a question on it this year, whereas the four previous consecutive years all had questions on the javascript grammar
I aced it, I think
 
sbi
@DeadMG Wait. You just had an exam without a question?! I must have done something wrong when I studied.
 
@sbi: As if I care what some website says ;)
@sbi: I had plenty of questions- just not any that summarized as "Did you memorize the JavaScript grammar?"
 
@jalf Nah I think it was designed so you can also run the code on a CPU.. of course depending on the problem it will probably run much slower on a CPU
 
sbi
@DeadMG Oh, that would be easy to answer for me: No, I didn't. Do I get all points for that?
 
11:01 AM
Would be cool to write something in OpenCL and then check how it performs on a GPU/CPU
I didn't bother with OpenCL so far cos of it's additional complicatedness.. CUDA seems much simpler, but no CPU support there.
 
@sbi: Kek. I wish I would, but fortunately it didn't come up
 
@Nils yeah but I mean, why would you want to run opencl code on a gpu? You get all the bother of writing GPU-compatible code, and then run it on the ridiculously slow CPU
worst of both worlds
 
Well it is not supposed to be ridiculously slow on the CPU, cos you have auto vectorization and it uses multiple threads..
 
@jalf I get what you meant, but we're pedants here, and there's a typo in the question you asked :P
 
11:06 AM
@Nils yes, which brings you up to, on a good day, 1% of what a mid-range GPU could do
in other words, ridiculously slow
 
yeah well it will run faster on a GPU
 
Ridiculously faster.
 
humm I don't know NV usually compares their examples to poor or single threaded CPU implementations
 
so it might not be factor 100 but factor 10 for real time applications
 
11:10 AM
@Nils they've made plenty of examples comparing to both efficient cpu implementations, and to the theoretical peak capabilities of CPUs
 
@DeadMG did you ever go on 4chan?
as it seems you use quite alot of internet slang
 
no
 
a several years old gpu can run a few hundred threads in parallel. Then its scheduler has around 64k other threads hanging around ready to run, to cover up pipelining stalls, so you get a high throughput at all times
oh, and each thread is of course running SIMD instructions.
 
@jalf The n-body sim is around 100 times faster.. data reduction on the gpu probably around 10 times and sorting humm wouldn't want to implement it myself on the cpu..
 
GPUs have massively higher throughput than CPUs on applicable applications
 
11:12 AM
G'day!
 
@Nils sure, there are problems that are more efficient to run on a cpu. But then you lose that advantage when you implement it in opencl anyway
 
remember that for any given CPU, you can't use it's full power anyway because you can't exclude lower CPUs
 
@DeadMG oh good
 
I just don't see the point in running opencl code specifically on the cpu. You'd generally use opencl for massively parallelizable problems. The ones where a gpu massively outperforms a cpu
for non-parallelizable problems, opencl is going to be painful no matter where you run it
 
Yeah well the point would be to write OpenCL code which runs on the GPU and at the same time getting an optimized CPU implementation..
 
11:14 AM
@Nils but why would you want the optimized CPU implementation?
I just don't see what that's getting you
apart from, as I suggested earlier, ease of debugging
 
@jalf Maybe you want to support machines that don't have an OpenCL-compatible GPU?
If there is such a thing.
 
Ability to fallback without duplicating code, or something.
 
sbi
@Nils How about implementing sleep sort on a GPU? :)
 
@sbi probably will have to try it
 
@sbi What's sleep sort?
 
sbi
11:16 AM
@TonyTheTiger And if he did, he'd never admit it! :)
 
Random sort, so no power is wasted on silly optimisations.
 
@sbi there is a timer in cuda I think
 
@sbi possibly, yea
 
sbi
21
Q: Implement Sleep Sort

SHiNKiROUSleep Sort is an integer sorting algorithm I found on the Internet. It opens an output stream, and for each input numbers in parallel, delay for the number seconds and output that number. Because of the delays, the highest number will be outputted last. I estimate it has O(n + m), where n is the ...

 
please let me try the GPU implementation
 
11:17 AM
is there no epic sort?
 
@sbi Ugh, sorting with data races. Clever, but stupid.
 
sbi
Hey, and google takes us to 4chan for that, @Tony: dis.4chan.org/read/prog/1295544154
 
@sbi I'm confused?!!!
 
Hmm, pretty neat. The algorithm then runs in negative time if you make sure all the values to be sorted are <= 0?
2
 
Speaking of Google. Today's Google Doodle is freaking awesome.
 
11:19 AM
or linear time, I guess. You still need to make all the sleep calls
 
sbi
@jalf Wouldn't that have to be: "The algorithm ran in negative time if..."?
 
what is google doolde?!
did I miss something?
 
@Nils It's the Google logo on google.com. Today's is interactive.
 
is it some special day or something today?
 
Sleep sort. Nice.
 
11:20 AM
ah heh
 
Sleep sort makes me sleepy! Zzzzzzz yawn
 
@TonyTheTiger It's Sleep Deprivation Day.
@TonyTheTiger Kidding. 96th anniversary of Les Paul
 
@MartinhoFernandes there's no wikipedia entry of it...
 
sbi
Google's PacMan doodle was the best. Also, it gave me 3hrs of free time, as my kids took rounds playing pacman on two laptops. :) Hard to beat that.)
 
@sbi I'll have to check my copy of the Time Traveler's Handbook of 1001 Tense Formations.
 
sbi
11:23 AM
@TonyTheTiger It's the first hit when you click on that thingummy.
 
@sbi Google is good for kids entertainment, nice :) I'll remember that if I ever have kids
 
@sbi Nice. Junior is yet to discover Google.
 
@sbi I was talking about Sleep Deprivation Day
 
yeah
it's time for today to un-become sleep deprived for me
good night lads
 
nite
lol
 
sbi
11:25 AM
@TonyTheTiger Actually it isn't all that good for kids, as they might find things you don't want them to. (For example, when I googled "oh hai guise" earlier, there were a few pictures found by google images that would make most Merkin parents blush.)
 
@DeadMG Isn't it like noon where you are?
 
12:25
but I have been awake for just over 24hours now s=o
 
sbi
@TonyTheTiger Oh that. We just declared it here about an hour ago.
 
@sbi I slept quite well last night, also this morning I was actually hungry when I got up for the first time in years....
maybe has to do with quitting smoking
 
sbi
@TonyTheTiger You don't smoke anymore.
@TonyTheTiger :)
 
11:27 AM
@sbi 5th day today, I'm still craving ciggy's
 
@DeadMG G'night!
 
sbi
@TonyTheTiger Ah, already 5 days?! Just another two weeks and you'll be through! :b
 
@TonyTheTiger It gets progressively easier.
I gave up nearly 10 years ago.
 
@Johnsyweb Gave up smoking, or gave up quitting?
2
 
sbi
@Johnsyweb Spoilsport!
@MartinhoFernandes He gave up giving up!
 
11:30 AM
I gave up giving up in between cigarettes.
I'm two months shy of ten years off them now.
 
@MartinhoFernandes I've tried quitting several times already and had given up quitting several times too.... hope this time I don't quit quitting
 
Hey, you're confusing me here! I'm sleep deprived.
 
@sbi I appreciate the encouragement :P
 
> Anything that happens, happens. Anything that, in happening, cause something else to happen, causes something else to happen. Anything that, in happening, causes itself to happen again, happens again. It doesn't necessarily do it in chronological order though.
Take that!
 
sbi
@TonyTheTiger I knew you would.
 
11:31 AM
lol
 
sbi
@MartinhoFernandes Wham! NKOTB.
 
now I have to remove myself from this chat once and for all and start getting stuff done in my life :)
 
sbi
@TonyTheTiger Why?
 
@sbi Cause I'm tired of procrastinating... been doing it for too long
and it gets me no where
 
@TonyTheTiger That's the point, right?
 
sbi
11:33 AM
@TonyTheTiger Procrastinate now! Don't put it off!
8
 
Yeah. What sbi said!
 
If you procrastinate to get somewhere, you're doing it wrong.
 
I'm going to do that right now
 
sbi
@Johnsyweb You're hired.
 
@sbi Wow, you're easy.
 
sbi
11:35 AM
@MartinhoFernandes Well, I still haven't said what for...
 
Hmmm...
Glad I didn't accept.
 
sbi
@Johnsyweb You don't have to. You're hired anyway.
 
@MartinhoFernandes I want to get somewhere in my life, this epic procrastination chat isn't getting me anywhere, so that's why I'm considering kicking the habit
While I'm kicking habits, I might as well kick all the bad ones at once :)
 
@TonyTheTiger I recommend incremental improvement. One thing at a time.
 
sbi
11:39 AM
@TonyTheTiger Uh oh. That sounds like an attempt failed before it even started.
 
Humm still thinking about the sleep sort.. you cannot let a thread sleep in a warp.. so I was thinking about just placing it into another array by mapping the value to the index somehow.. which would work unless you have duplicates
 
@sbi what do you mean? You think I'm no good at quitting?
 
@Nils > you cannot let a thread sleep in a warp
What does this mean?
 
@MartinhoFernandes that's what I just said
 
Huh... what's a warp? Why does Star Trek have anything to do with threads?
 
11:43 AM
/me is confused ?!!!
warped threads are a new concept to me...
 
sbi
@TonyTheTiger Nobody is good at quitting everything at once.
 
@MartinhoFernandes Nvidia/GPU terminology the scheduler in a streaming multiprocessor automatically bundles threads in a block into warps which are executed at the same time.
 
@sbi Not quitting everything, still gonna talk about sex, just not on here :P
 
sbi
@MartinhoFernandes Actually there were threads in Star Trek, but the sewing of their costumes was done in the background and never made much fuzz over. :)
 
lulz
@sbi that caused me to drop my mouse on the floor
 
11:46 AM
and threads in a warp share the control unit, so if you have divergence all threads in a warp have to go through all paths, therefore no sleep in a cuda thread
I think thrust::sort uses something like this en.wikipedia.org/wiki/Bitonic_sorter
 
sbi
@TonyTheTiger I'm not sure if this is praise or damnation. :(
 
@sbi I was laughing so... wasn't meant in a bad way
 
threads can be warped it seems
In weaving cloth, the warp is the set of lengthwise yarns that are held in tension on a frame or loom. The yarn that is inserted over-and-under the warp threads is called the weft, woof, or filler. Each individual warp thread in a fabric is called a warp end or end. Warp means "that which is thrown across" (Old English wearp, from weorpan, to throw, cf. German werfen, Dutch werpen). Very simple looms use a spiral warp, in which a single, very long yarn is wound around a pair of sticks or beams in a spiral pattern to make up the warp. Because the warp is held under extreme tension duri...
just not the threads we were thinking of
 
@Nils Bookmarked, thanks.
@TonyTheTiger Well, those were the threads @sbi was thinking of.
 
11:49 AM
> In the GeForce 8800GTX, once a block is assigned to
a Streaming Multiprocessor, it is further divided into 32-thread units called Warps.
now it makes more sense
 
:)
no sleep sort on the GPU or at least I don't see how
 
@TonyTheTiger Shouldn't @Miss have turned up at that comment?
 
@Nils I assume you can't control the warp division process.
You guys miss @Miss?
 
sbi
@Johnsyweb You bastard! I've flagged that!
 
No that's because GPU's do thread scheduling in hardware, which is a good thing since it leads to almost no overhead when creating/switching threads
So I should really get some work done..
 
sbi
11:51 AM
@MartinhoFernandes <silently_weaps/>
 
"You cannot counterflag your own message" :-(
So much for getting access to the moderator tools(!)
 
@Nils :( if you could devise a way to work on only one input for each set of threads (or warps or whatever they're called)... Waste of parallelism, but then the goal is to sleep anyway, so...
 
randomsort would be much more suitable for a gpu
should parallelize really well
 
Obtain a blank piece of paper [1].
Tear, or cut, the paper into small pieces.
Upon each piece, write down a label for an element you wish to sort. Use one piece of paper for each and every element.
For mystical, or even pseudo-religious, effect you might wish to perform some sort of ceremony on the paper now. A song is usually good. A dance adds an extra air of authenticity [2].
Place all of the pieces of paper into a hat, or other container.
One-by-one, remove each piece of paper, and form a line on a desk, or failing everything else, the floor.
@jalf You're talking about this?
 
@MartinhoFernandes yeah
each thread tries a random ordering, and checks if it's sorted
 
11:57 AM
How do you make a GPU dance?
(and btw, I knew that algorithm as bogosort)
 
yeah, that's another good name for it
 
The many-worlds version works in linear time, and you can get some speed up (haven't done the math) if you parallelize it in-universe.
Wait, you can't get a speed up. You can't parallelize shuffling, right?
 
@MartinhoFernandes no, but you can perform multiple shuffles in parallel
so given sufficiently parallel hardware, it'd run in the time it takes for a single shuffle
well, plus a subsequent linear scan and a big huge reduce() call
 
12:45 PM
could any one please help me to run app at this link cs.jhu.edu/~misha/Code/PoissonRecon i have tried USAGE Section off that link ....when i type exe name after going at the directory where it is resides.. it works fine but gives error when i type following command % PoissonRecon --in horse.npts --out horse.ply --depth 10
i am running EXE through CMD (command prompt)
 
1:07 PM
@Pritesh What is happening when you try to run it?
 
If you need a local function in a .cpp file, do you define it as a static function or do you define it in an anonymous namespace? Or both?
 
@StackedCrooked Won't really matter since it will be local to a translation unit.
 
@StackedCrooked I'd use an anonymous namespace
 
@EtiennedeMartel It gives me error "%" is not recognized as an internal or external command
 
1:30 PM
@Pritesh What is that % doing there in the command line?
 
@jalf Thanks, seems like the C++ way to go.
 
@EtiennedeMartel it is command line argument you can see it from link here see in USAGE Section of this link cs.jhu.edu/~misha/Code/PoissonRecon
 
I'm reading Herb Sutter's article about false sharing. He mentions "a performance analyzer that lets you examine the cycles per instruction (CPI)" and "a performance analyzer that can measure cache misses, or better still cache line contention".
Where can I find such a thing?
 
@MartinhoFernandes Intel VTune, cachegrind,
 
1:48 PM
@Pritesh Aaaah. Not, it's not part of the command line, it's just a symbol used to represent the shell input (the author should have used '>' in my opinion). PoissonRecon is the name of the executable, and as such should be first.
 
What would you think about adding the c++-faq tag to
10
Q: Is C++11 (C++0x) a complete super set of C++03 ?

iammilindC++ considered (almost) super set of C; but still there are certain things which works in C and not in C++. Is there any feature/facility which is a valid C++03 but not working in C++11 ?

 
@EtiennedeMartel show as per your suggestion what should be the shell input then? Thanks for replying.......
 
@Pritesh Just remove the %.
 
ok
trying
 
:( GCC still doesn't have the generalized attribute thingies.
 
1:53 PM
@EtiennedeMartel % is the default csh prompt for normal user.
 
@AProgrammer Aaah. Thanks for the info.
 
@EtiennedeMartel thank you so so so so much...........you have solve my big big big problem......BTW, i am doing programming in C# so i am completely unaware of C++ BTW,, Thank you so much
 
@Pritesh No problem. And I doubt you're "completely" unaware of C++ considering it shares most of its syntax with C#...
 
@EtiennedeMartel ya but shell input is awkward for me...and i am also newbie in programming world.......
 
@EtiennedeMartel Knowing the syntax will get you nowhere useful though :(
They're completely different languages.
They just look similar.
 
2:14 PM
I wouldn't say that C++ and C# are "completely different languages". Really different languages would be, for example, C++ and Prolog.
2
 

« first day (236 days earlier)      last day (4695 days later) »