"The survival of liberty in our land increasingly depends on the success of liberty in other lands. The best hope for peace in our world is the expansion of freedom in all the world."
- George W. Bush
More pages: 1 ... 11 ... 21 ... 31 ... 41 ... 51 ... 61 62 63 64 65 66 67 68 69 70 71 72 ... 81 ... 91 ... 101 ... 111 ... 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 ... 365
Query FailedAslan Dzodzikov
Friday, May 14, 2010

It is possible to create just one templated constructor:

namespace StringHashHelper
{
template<size_t N>
unsigned _Hash(const char (&str)[N])
{
typedef const char (&truncated_str)[N-1];
return str[N] + 65599 * _Hash<N-1>((truncated_str)str);
}

template<>
unsigned _Hash<1>(const char (&str)[1])
{
return str[0];
}
};

class StringHash
{
unsigned m_val;

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

operator unsigned() { return m_val; }
};

StringHash a = "a", ab = "ab";

This implementation guaranties loop unrolling.

Aslan Dzodzikov
Friday, May 14, 2010

I have noticed similar inefficiency in MSVC 2008 SP1 - it doesn't eliminate dead code in very obvious case of auto_ptr copy.

ocsi
Thursday, May 13, 2010

DrBalthar: NVIDIAs bigest problem is the system integration era. You know the AMD Fusion is comming, and Intel already have an IGP in their CPU-s. With out an x86 license they don't able to follow this path, so they lost millions of costumer, and billions of money.
The property business model is a way to survive. They cut out the competition in a little segment of the PC market.

Michal Holis
Wednesday, May 12, 2010

Congratulations!

Josef
Tuesday, May 11, 2010

Grattis! Verkar som du har blivit vuxen till slut! :P

Josef
Tuesday, May 11, 2010

Grattis! Verkar som du har blivit vuxen till slut! :P

Byron
Monday, May 10, 2010

Congratulations :9

dblack
Wednesday, May 5, 2010

I would still rather see some cool demos, perhaps HDR, environment mapped rings if needed:-)

None of this real life stuff...

David

More pages: 1 ... 11 ... 21 ... 31 ... 41 ... 51 ... 61 62 63 64 65 66 67 68 69 70 71 72 ... 81 ... 91 ... 101 ... 111 ... 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 ... 365