• Create Account

David Neubelt

Member Since 01 Mar 2007
Offline Last Active Jan 31 2016 01:29 AM

Bitfields and Endianness

05 January 2011 - 06:01 PM

I had to port some code from a little endian platform to a big endian platform. To get the binary 32-bit data to read in correctly I had to,

1) reverse the order of the bitfield
2) byte swap the 32-bit word.

I understand why I need to do #2 but #1 seems fairly arbitrary. Anyone have any insight on why this is the case? I can't imagine it being more efficient either way.

Thanks,
-= Dave

smart pointers and undefined behavior

13 May 2010 - 09:53 AM

Hello, I have this code bar->var = func(); bar is a smart pointer and func() changes what bar points to. On all platforms we've previously used this code the bar-> is evaluated after func() is called which gives us the expected results. Now, on our latest platform and compiler bar-> is evaluated first and then func is called and it trashes on all our data. Two questions: 1) Is this undefined behavior and if it is can you explain why? 2) How do most systems with smart pointers get around this, if it is undefined? Thank you, -= Dave

Metric for floating point comparisons

22 October 2009 - 06:41 AM

Hello, I'm writing fast SIMD optimized approximations for math functions. I'm stuck on trying to determine a good metric for determining how close my approximated function is to the cmath functions in C++/C. For example, ::sin(f) I can go over the domain of [-pi, pi] at very small step sizes and determine the maximum absolute error e.g. |sinaprox(x) - ::sin(x)|. But imagine another function like ::sqrt(x) that has a domain of [0, float max]. I can't really compute the maximum absolute error because at large numbers most bits in the mantissa are being utilized for the whole part of the number and not the fractional part. I'm stuck at trying to find a good metric. I thought that I could simply xor the two inputs together and count the number of bits that are different but I didn't have good luck with that. Any ideas? Thank you! -= Dave

data organization/management

15 October 2009 - 05:13 AM

Hey, At work it's important for me to keep up to date on the latest graphical techniques. I have RSS feeds to all the blogs of other graphics programmers, I monitor conferences, and publications for any findings. I have been managing a document hierarchy of thousands of pdf's, ppts, movies, etc on graphical techniques. I try to keep it as organized as possible with shortcuts to each section. E.g. I'll put a GI paper published at siggraph in the siggraph 09 folder but also put a shortcut to it in my GI folder. When it comes time to implement an algorithm at work I start scanning through all my blogs/docs/etc.. to find all the relevant information. This works ok but the amount of data I have is becoming too large for my brain to handle. As any programmer/hacker would do I started thinking about rolling my own SQL database solution that would allow me to tag documents and enter the location (either webpage/local drive/shared drive). Then I could put a nice web interface or hack toger a quick desktop GUI over the database. But then I realized I have better things to do with my time such as prototying fun graphic algorithms that I read about. :) I'm guessing this is a solved solution and there is free software out there that does exactly this. Has anyone used anything and had success with it? Any recommendations would be appreciated! Thanks, -= Dave

Online Math courses

21 June 2009 - 06:41 PM

Hey, I'm looking into a local graduate program in applied math. It's great because I work during the day at my game job and can take the grad classes during night. Unfortunately, to be accepted into the program I need to take two courses Advanced Calculus (I'm guessing a Real Analysis style course) Probability Theory They offer those courses during the day. I can't take them so I was wondering if anyone knows some respectable colleges where I can enroll in those two classes online. Thank you, -= Dave

PARTNERS