"UNIX is simple. It just takes a genius to understand its simplicity."
- Dennis Ritchie
More pages: 1 ... 11 ... 21 ... 31 ... 41 ... 51 ... 61 ... 71 ... 81 ... 91 ... 101 ... 105 106 107 108 109 110 111 112 113 114 115 ... 121 ... 131 ... 141 ... 151 ... 161 ... 171 ... 181 ... 191 ... 201 ... 211 ... 221 ... 231 ... 241 ... 251 ... 261 ... 271 ... 281 ... 291 ... 301 ... 311 ... 321 ... 331 ... 341 ... 351 ... 361 ... 371 ... 381 ... 391 ... 401 ... 411 ... 421 ... 431 ... 438
Query FailedCaffeinePwrdAl
Wednesday, May 25, 2011

Congratulations

Ethan
Tuesday, May 24, 2011

Congratulations!

Aslan Dzodzikov
Friday, May 20, 2011

Hi all.

cDc, __forceinline makes the thing. As for build times, you can unroll the "inlining loop" further, just like here:

class StringHash
{
unsigned m_val;

template<size_t N> __forceinline unsigned _Hash(const char (&str)[N])
{
typedef const char (&truncated_str)[N-4];
return str[N-1] + 65599*(str[N-2] + 65599*(str[N-3] + 65599 * (str[N-4] + 65599*_Hash((truncated_str)str))));
}
__forceinline unsigned _Hash(const char (&str)[4])
{
typedef const char (&truncated_str)[3];
return str[3] + 65599 * _Hash((truncated_str)str);
}
__forceinline unsigned _Hash(const char (&str)[3])
{
typedef const char (&truncated_str)[2];
return str[2] + 65599 * _Hash((truncated_str)str);
}
__forceinline unsigned _Hash(const char (&str)[2]) { return str[1] + 65599 * str[0]; }
__forceinline unsigned _Hash(const char (&str)[1]) { return str[0]; }

public:
template <size_t N> __forceinline StringHash(const char (&str)[N]) { m_val = _Hash(str); }
operator unsigned() { return m_val; }
};

int _tmain(int argc, _TCHAR* argv[])
{
#define STRING_262 "The a value 1, The a value 2,...etc
printf("a hash = %x\n", StringHash(STRING_262) );
printf("b hash = %x\n", StringHash("The b value" );
printf("a hash 2 = %x\n", StringHash(STRING_262) );
return 0;
}

Here STRING_262 is a 262 char string. This test program builds in 2 sec., and all hash values are computed at build time.

Makenshi,
the StringHash is a compile time tool, an exact value of its argument must be known by compiler.

nbohr1more
Thursday, May 19, 2011

I am looking into techniques to either:

1) Bias the whole Doom 3 interaction.vfp with a 3D texture (every ambient light)

or

2) Slice-up a 3D texture into Doom 3 style 1D+2D projection sets (smallest number possible?).

What tool did you use to create the 3D light map?

Is the 3D texture format used here a standard one?

Bridesmaid dresses
Monday, May 16, 2011

Well, to soon to say if it�s good, but at least it�s well designed.
I mean I thought I would be blocked after adding some interests, but the site helps you to add more.

Jochen
Wednesday, May 11, 2011

Congrats!

iOrange
Wednesday, May 11, 2011

Cool! Congratulations and best wishes!

sqrt[-1]
Wednesday, May 11, 2011

Humm, I am sure I have filed a patent on this technique...

More pages: 1 ... 11 ... 21 ... 31 ... 41 ... 51 ... 61 ... 71 ... 81 ... 91 ... 101 ... 105 106 107 108 109 110 111 112 113 114 115 ... 121 ... 131 ... 141 ... 151 ... 161 ... 171 ... 181 ... 191 ... 201 ... 211 ... 221 ... 231 ... 241 ... 251 ... 261 ... 271 ... 281 ... 291 ... 301 ... 311 ... 321 ... 331 ... 341 ... 351 ... 361 ... 371 ... 381 ... 391 ... 401 ... 411 ... 421 ... 431 ... 438