这是我的情况:
我正在使用Ubuntu 10.04(Lucid Lynx).系统的默认Python是v2.6.5,但我需要Python v2.7.所以我从python.org下载了源代码并尝试安装它.
我第一次安装它时,我跑了:
cd Python2.7.4
./configure --prefix=/usr
make
su root
make install
Run Code Online (Sandbox Code Playgroud)
这会将Python 2.7安装到我的系统中.它将创建一个链接,"python",也/usr/bin链接到.因此,当我输入时,系统将为我启动Python 2.7.4,就像我输入时一样.python2.7/usr/bin>python>python2.7
但是当我以这种方式安装时:
cd Python2.7.4
./configure --prefix=/usr
make
su root
make altinstall
Run Code Online (Sandbox Code Playgroud)
链接"python" /usr/bin仍然存在,并且链接到python2.6默认系统版本.当然,我可以删除它并创建一个链接到的新软链接python2.7.
除了链接之外,命令"make install"和"make altinstall"之间有什么区别/usr/bin?
基本上我想通过将 cuFFT 执行函数放在 for 循环中来测量 cuFFT 函数的时间成本,这是我第一次使用的代码(这是 Nvidia 网站中用于 CUDA 的简单示例):
顺便说一下,我的CPU是Intel I7-3630QM 2.40GHz,GPU是Nvidia NVS 5200M。我使用的平台是Visual Studio 2012和CUDA 5.5,操作系统是Windows 7,64位。
#include "cuda_runtime.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <cufft.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#define NX 1024
#define NY 1024
int main(int argc, char** argv) {
int i;
int Iter;
cufftHandle plan;//A data structure named plan containing all information needed for Fourier Transform.
cufftComplex *data1;//data structure to store the real value and complex value of the …Run Code Online (Sandbox Code Playgroud)