小编Dev*_*ood的帖子

更新ADT后无法从AVD(仿真器)中的键盘(硬件)键入

我刚刚更新到ADT 20和最新的SDK,但从那以后不知道为什么我不能在AVD(模拟器)中键入键盘(硬件).

android android-emulator

8
推荐指数
1
解决办法
6241
查看次数

真实数组的一维批处理 FFT

我听说/读过,如果我们有一些n FFT 来执行一些m 个向量,我们可以使用 cuFFT 的批处理模式。所以为了测试它,我制作了一个示例程序并运行它。我使用的数据是一个文件,其中包含一些1024浮点数,因为相同的1024数字重复了10多次。虽然1024点 FFT应该得到相同的结果,但我没有得到。如果我在某处概念上有错误,请纠正我,下面是代码,如果你能纠正我犯的一些错误。

注意:我只使用 1D FFT。

这是代码片段:

#include <cuda.h>
#include <cufft.h>
#include <stdio.h>
#include <math.h>

#define NX 1024
#define DATASIZE 1024
#define BATCH 10

int main (int argc, char* argv[])
{
        cufftHandle plan;
        cufftComplex *deviceOutputData, *hostOutputData;
        cufftReal *hostInputData, *deviceInputData;
        int i,j;

        FILE *in; // *out, *fp;

        cudaMalloc ((void**)&deviceInputData, NX*BATCH*sizeof(cufftReal));
        hostInputData = (cufftReal*) malloc (NX*BATCH*sizeof(cufftReal));

        cudaMalloc ((void**)&deviceOutputData, NX*BATCH*sizeof(cufftComplex));
        hostOutputData = (cufftComplex*) malloc (NX*BATCH*sizeof(cufftComplex));

        in = fopen …
Run Code Online (Sandbox Code Playgroud)

cuda fft fftw cufft

0
推荐指数
1
解决办法
2614
查看次数

标签 统计

android ×1

android-emulator ×1

cuda ×1

cufft ×1

fft ×1

fftw ×1