Search found 5 matches

by phkahler
Sat May 03, 2014 12:38 am
Forum: Considered Harmfull
Topic: GCC SIMD vector types
Replies: 3
Views: 31422

Re: GCC SIMD vector types

Oops. I left out the double in the typedef. That seems to change the asm but not the conclusion: addem: .LFB0: .cfi_startproc movapd 8(%rsp), %xmm2 movq %rdi, %rax movapd 40(%rsp), %xmm1 addpd %xmm2, %xmm1 movapd 24(%rsp), %xmm0 addpd 56(%rsp), %xmm0 movapd %xmm1, -104(%rsp) movq -104(%rsp), %rdx mo...
by phkahler
Fri May 02, 2014 11:23 pm
Forum: Considered Harmfull
Topic: GCC SIMD vector types
Replies: 3
Views: 31422

Re: GCC SIMD vector types

Thanks for the tip. I compiled the following with -S and -O3 in test.c typedef v4df __attribute__ ((vector_size (32))); v4df addem(v4df a, v4df b) { return a+b; } And got this for output: addem: .LFB0: .cfi_startproc movdqa 8(%rsp), %xmm2 movq %rdi, %rax movdqa 40(%rsp), %xmm1 paddd %xmm2, %xmm1 mov...
by phkahler
Thu May 01, 2014 8:02 pm
Forum: Considered Harmfull
Topic: GCC SIMD vector types
Replies: 3
Views: 31422

GCC SIMD vector types

I'm taking my first dive into vectorization, using a recent version of GCC. I like their method of defining vector types described here: http://jeanjacques.lacrampe.free.fr/webada/doc/gnat/gcc_6.html#SEC160 This allows you to use ordinary code for basic vector operations, as well as passing them as ...
by phkahler
Tue Mar 25, 2014 2:53 pm
Forum: General Development
Topic: Efficient sampling of many lights
Replies: 22
Views: 14940

Re: Efficient sampling of many lights

I tried something a bit similar several years ago. My goal then was to use photon mapping for indirect lighting and rays for direct lighting. I put all light sources into an octtree. The lights would be inserted in the tree using a bounding box based on brightness. You could use more arbitrary shape...
by phkahler
Mon Jan 27, 2014 1:53 am
Forum: General Development
Topic: ordering primary rays
Replies: 1
Views: 1630

Re: ordering primary rays

In the old day of ompf.org I posted something about this. I was doing single rays even for the camera and found that shooting rays in Z-order (depth first quad tree order) resulted in some percent performance increase. i think it was between 7 and 9 percent for what I was doing at the time. The reas...

Go to advanced search