64-bit

How can I build my C extensions with MinGW-w64 in Python?

眉间皱痕 提交于 2019-12-17 17:31:13
问题 So I have a few Python C extensions I have previously built for and used in 32 bit Python running in Win7. I have now however switched to 64 bit Python, and I am having issues building the C extension with MinGW-w64. I made the changes to distutils as per this post, but I am getting some weird errors suggesting something is wrong: $ python setup.py build running build running build_ext building 'MyLib' extension c:\MinGW64\bin\x86_64-w64-mingw32-gcc.exe -mdll -O -Wall -Ic:\Python27\lib\site

Force x86 CLR on an 'Any CPU' .NET assembly

喜你入骨 提交于 2019-12-17 17:25:56
问题 In .NET, the 'Platform Target: Any CPU' compiler option allows a .NET assembly to run as 64 bit on a x64 machine, and 32 bit on an x86 machine. It is also possible to force an assembly to run as x86 on an x64 machine using the 'Platform Target: x86' compiler option. Is it possible to run an assembly with the 'Any CPU' flag, but determine whether it should be run in the x86 or x64 CLR? Normally this decision is made by the CLR/OS Loader (as is my understanding) based on the bitness of the

x64 instruction encoding and the ModRM byte

若如初见. 提交于 2019-12-17 16:48:11
问题 The encoding of call qword ptr [rax] call qword ptr [rcx] is FF 10 FF 11 I can see where the last digit (0/1) comes from (the register number), but I'm trying to figure out where the second last digit (1) comes from. According to AMD64 Architecture Programmer’s Manual Volume 3: General-Purpose and System Instructions page 56, "/digit - Indicates that the ModRM byte specifies only one register or memory (r/m) operand. The digit is specified by the ModRM reg field and is used as an instruction

Identifier for win64 configuration in Qmake

五迷三道 提交于 2019-12-17 15:54:21
问题 Is there a "win64" identifier in Qmake project files? Qt Qmake advanced documentation does not mention other than unix / macx / win32. So far I've tried using: win32:message("using win32") win64:message("using win64") amd64:message("using amd64") The result is always "using win32". Must I use a separate project-file for x32 and x64 projects, so they would compile against correct libraries? Is there any other way to identify between 32-bit and 64-bit environments? 回答1: I do it like this win32

Loading x86 or x64 assembly

巧了我就是萌 提交于 2019-12-17 15:35:54
问题 I have two versions of System.Data.SQLite.DLL - for x86 and x64 platform. The x86 version keeps in application folder and x64 version keeps in appFolder\x64 folder. The application compiled as AnyCPU. How can i load needed version of SQLite according to windows platform? 回答1: If you are using SQLite from http://system.data.sqlite.org, the System.Data.SQLite.DLL is completely managed. There is an underlying native DLL, SQLite.Interop.DLL, that needs to change depending on the process (32- or

64-bit Performance Advantages

为君一笑 提交于 2019-12-17 12:40:44
问题 What is the source of the performance advantage 64-bit applications have over 32-bit applications? I'm assuming there is a performance advantage because programs like WinRAR advertise it. Also, can we get these performance advantages simply by switching to a 64-bit compiler, or are there any changes in code that need to be made? Answers related to both, unmanaged and managed code, are welcome. 回答1: In order to take advantage of the 64 bit architecture of the latest CPU's you have to: use a 64

2D morton code encode/decode 64bits

末鹿安然 提交于 2019-12-17 11:13:27
问题 How to encode/decode morton codes(z-order) given [x, y] as 32bit unsigned integers producing 64bit morton code, and vice verse ? I do have xy2d and d2xy but only for coordinates that are 16bits wide producing 32bit morton number. Searched a lot in net, but couldn't find. Please help. 回答1: If it is possible for you to use architecture specific instructions you'll likely be able to accelerate the operation beyond what is possible using bit-twiddeling hacks: For example if you write code for the

2D morton code encode/decode 64bits

元气小坏坏 提交于 2019-12-17 11:13:11
问题 How to encode/decode morton codes(z-order) given [x, y] as 32bit unsigned integers producing 64bit morton code, and vice verse ? I do have xy2d and d2xy but only for coordinates that are 16bits wide producing 32bit morton number. Searched a lot in net, but couldn't find. Please help. 回答1: If it is possible for you to use architecture specific instructions you'll likely be able to accelerate the operation beyond what is possible using bit-twiddeling hacks: For example if you write code for the

XmlSerializer startup HUGE performance loss on 64bit systems

久未见 提交于 2019-12-17 10:44:56
问题 I am experiencing a really HUGE performance loss while calling a simple XmlSerializer.Deserizlize() on a class with lots of fields. NOTE : I'm writing the code without Visual Studio, at home, so it may have some errors. My serializable class is flat and has hundreds of fields: [Serializable] class Foo { public Foo() { } [XmlElement(ElementName = "Field1")] public string Field1; // [...] 500 Fields defined in the same way [XmlElement(ElementName = "Field500")] public string Field500; } My

CentOS 64 bit bad ELF interpreter

自古美人都是妖i 提交于 2019-12-17 10:07:37
问题 I have just installed CentOS 6 64bit version, I'm trying to install a 32-bit application on a 64-bit machine and got this error: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory I'm new to linux. How do I resolve this? 回答1: You're on a 64-bit system, and don't have 32-bit library support installed. To install (baseline) support for 32-bit executables (if you don't use sudo in your setup read note below) Most desktop Linux systems in the Fedora/Red Hat family: pkcon install