64-bit

What's the purpose of compressed object pointers?

别来无恙 提交于 2020-01-03 11:00:26
问题 Following my question on whether the CLR could use compressed pointers, the answer was that it's pretty pointless. Still, some JVMs are implementing it, so what are the concrete benefits of this optimization, since gaining 4 bytes doesn't seem worth it? 回答1: There is huge value in compressed references. First, on x86, 64 bit modes unlock 8 new registers to be used, which is a huge performance win. Second, using 4 byte instead of 8 byte headers / object pointers significantly improves cache

Trying to use jawt on 64-bit WIndows 7 OS

ぃ、小莉子 提交于 2020-01-03 03:27:24
问题 I created a Java chat application several years ago on my 32-bit system and am using native code to achieve a window flash when a message is received and the window is minimized. I recompiled the C++ code that does the flashing with a 64-bit compiler and I have the 64-bit JRE version. However, when attempting to run the flash, I get an exception. Below is the C++ code and below that is the output of the log file. Thanks for any insight. #include "FlashWindow.h" #include <jawt_md.h> #include

What efficient way to load x64 ymm register with 4 seperated doubles?

瘦欲@ 提交于 2020-01-03 02:54:59
问题 What is the most efficient way to load a x64 ymm register with 4 doubles evenly spaced i.e. a contiguous set of doubles 0 1 2 3 4 5 6 7 8 9 10 .. 100 And i want to load for example 0, 10, 20, 30 4 doubles at any position i.e. i want to load for example 1, 6, 22, 43 回答1: The simplest approach is VGATHERQPD which is an AVX2 instruction available on Haswell and up. VGATHERQPD ymm1, [rsi+xmm7*8], ymm2 Using dword indices specified in vm32x, gather double-pre-cision FP values from memory

64bit compilation with visual studio express 2013

£可爱£侵袭症+ 提交于 2020-01-03 02:22:44
问题 I have to compile a C++ project and make it run as 64bit application to avoid the 32bit memory limitation. My IDE is Visual Studio 2013 Express for Windows Desktop I couldn't find a clear answer on how to do this, anybody has a solution ? 回答1: From command line, load the cross-compiler : call %VSDIR%\VC\vcvarsall.bat x86_amd64 Open solution %VSDIR%\Common7\IDE\WDExpress.exe solution.sln and that's it. The x86_amd64 switch to a compiler (which happens to be a 32bit program) that produces 64bit

Error: Total size of array must not exceed 0x7fffffff bytes

不羁的心 提交于 2020-01-02 09:23:26
问题 I have a small C++ program that requires a large 2d array. int distanceArray[282][9900000]; I am aware that a standard 32 bit console application would be unable to allocate this much memory to my process due to the 2GB cap on 32 bit applications. However, despite the fact that I have configured my compiler to use the native amd64 toolset, I still get the same error when I try to build my application: Error C2148 total size of array must not exceed 0x7fffffff bytes I have 16GB of RAM on my

calling a c++ code from C# in x64 all arguments shift by one

浪尽此生 提交于 2020-01-02 08:12:07
问题 my c++ dll: int test2::CallMe(int y) { return y; } c# code: [DllImport("test2.dll",CharSet = CharSet.Anci)] private static extern int CallMe(int y); Console.WriteLine(CallMe(7)); if the dll and the test program are compiled in x86 i get a print: 7 but if i compile them at X64 for c++ and X64 or any CPU for c# the print is: 0 Any suggestion? edit: the problem is the call, because in debugger i see that the CPP receives 0 , or null in case of struct. edit 2: the functions are exported using a

calling a c++ code from C# in x64 all arguments shift by one

假如想象 提交于 2020-01-02 08:11:54
问题 my c++ dll: int test2::CallMe(int y) { return y; } c# code: [DllImport("test2.dll",CharSet = CharSet.Anci)] private static extern int CallMe(int y); Console.WriteLine(CallMe(7)); if the dll and the test program are compiled in x86 i get a print: 7 but if i compile them at X64 for c++ and X64 or any CPU for c# the print is: 0 Any suggestion? edit: the problem is the call, because in debugger i see that the CPP receives 0 , or null in case of struct. edit 2: the functions are exported using a

calling a c++ code from C# in x64 all arguments shift by one

余生长醉 提交于 2020-01-02 08:11:23
问题 my c++ dll: int test2::CallMe(int y) { return y; } c# code: [DllImport("test2.dll",CharSet = CharSet.Anci)] private static extern int CallMe(int y); Console.WriteLine(CallMe(7)); if the dll and the test program are compiled in x86 i get a print: 7 but if i compile them at X64 for c++ and X64 or any CPU for c# the print is: 0 Any suggestion? edit: the problem is the call, because in debugger i see that the CPP receives 0 , or null in case of struct. edit 2: the functions are exported using a

How to force using 64 bit python on Mac OS X?

牧云@^-^@ 提交于 2020-01-02 06:07:34
问题 I got the following error when compiling sip with --arch x86_64 option. prosseek:siplib smcho$ python -c 'import sip; print sip' Traceback (most recent call last): File "", line 1, in ImportError: dlopen(./sip.so, 2): no suitable image found. Did find: ./sip.so: mach-o, but wrong architecture I found that the prebuilt Mac OS X python (snow leopard) is universal, and it doesn't get the 64 bit library. I guess it's running on 32bit mode. file /usr/bin/python /usr/bin/python: Mach-O universal

Copy vtkImageData to cv::Mat

末鹿安然 提交于 2020-01-02 06:00:31
问题 I am trying to copy a vtkImageData* class to a cv::Mat structure [my goal is to read an MHD file into OpenCV].. The file is essentially a 3D Matrix so I want to get a vector containing all the slices of the volume. So far, I have come up with this code, reader->SetFileName(INPUT_DATA_1.c_str()); reader->Update(); imageData_1 = reader->GetOutput(); extractVOI->SetInput(imageData_1); int dims[3]; imageData_1->GetDimensions(dims); extractVOI->SetVOI(0, dims[0], 0, dims[1], 75, 75); // Set it to