http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/ray_linn/GCC-4.7.0-with-ada/mingw-w64-gcc-4.7.0-runtime-2.0.1-static-ada-20120330.7z/download Other builds may also work but due to the constantly changing nature of the compiler this cannot be guaranteed. I often had to change compilers while building the libraries and this one is the one that did the job for most of them. This first support is experimental and considered "advanced". To enable pass -DWITH_MINGW64 during cmake configuration. Also make sure to extract the compiler on C:/MinGW and that MinGW/bin is in your path. To build check out lib/mingw64. Initially the support is lacking until I get every library compiled correctly. For now you should disable WITH_CYCLES(sorry, I know some people are dying to do benchmarks, but still a few libs to go), WITH_IMAGE_OPENEXR, WITH_OPENCOLLADA, WITH_LIBMV and WITH_CODEC_FFMPEG(links but hangs on startup). Still the tools are working, the memory limit is increased and due to the experimental nature of the setup, full optimization with SSE2 is available, which makes the build quite fast. Also the compiler and especially, the linker are way faster than regular MinGW. The wiki docs have also updated. Happy testing!
64 lines
1.6 KiB
C++
64 lines
1.6 KiB
C++
/*
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
* All rights reserved.
|
|
*
|
|
* The Original Code is: all of this file.
|
|
*
|
|
* Contributor(s): none yet.
|
|
*
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
*/
|
|
|
|
/** \file gameengine/Expressions/KX_HashedPtr.cpp
|
|
* \ingroup expressions
|
|
*/
|
|
|
|
|
|
#include "KX_HashedPtr.h"
|
|
|
|
unsigned int KX_Hash(void * inDWord)
|
|
{
|
|
#if defined(_WIN64) && !defined(FREE_WINDOWS64)
|
|
unsigned __int64 key = (unsigned __int64)inDWord;
|
|
#else
|
|
unsigned long key = (unsigned long)inDWord;
|
|
#endif
|
|
|
|
key += ~(key << 16);
|
|
key ^= (key >> 5);
|
|
key += (key << 3);
|
|
key ^= (key >> 13);
|
|
key += ~(key << 9);
|
|
key ^= (key >> 17);
|
|
|
|
return (unsigned int)(key & 0xffffffff);
|
|
}
|
|
|
|
|
|
CHashedPtr::CHashedPtr(void* val) : m_valptr(val)
|
|
{
|
|
}
|
|
|
|
|
|
|
|
unsigned int CHashedPtr::hash() const
|
|
{
|
|
return KX_Hash(m_valptr);
|
|
}
|