Commit 626acb0c authored by cucengineer's avatar cucengineer

cuFFT gNB ok

parent f7c46044
......@@ -725,15 +725,15 @@ int main( int argc, char **argv )
init_opt();
load_cuFFT();
int32_t a[2048] = {1};
int32_t *b = (int32_t *)malloc(2048 * sizeof(int32_t));
int i;
for (i = 0; i < 2048; i++)
{
a[i]= 2048-i;
}
cudft204((int16_t*)a,(int16_t*)b,1);
cudft2048((int16_t*)a,(int16_t*)b,1);
// int32_t a[2048] = {1};
// int32_t *b = (int32_t *)malloc(2048 * sizeof(int32_t));
// int i;
// for (i = 0; i < 2048; i++)
// {
// a[i]= 2048-i;
// }
// cudft204((int16_t*)a,(int16_t*)b,1);
// cudft2048((int16_t*)a,(int16_t*)b,1);
#ifdef PDCP_USE_NETLINK
......
......@@ -28,8 +28,6 @@
#include <pthread.h>
#include <execinfo.h>
#include <dlfcn.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
......@@ -6262,27 +6260,10 @@ void dft6144(int16_t *input, int16_t *output,unsigned char scale)
tmp[2][i] = ((uint32_t *)input)[j++];
}
//手动加载指定位置的so动态库
void* handle = dlopen("./cuFFT.so", RTLD_LAZY);
void (*cudft2048)(int16_t *x,int16_t *y);
//根据动态链接库操作句柄与符号,返回符号对应的地址
cudft2048 = dlsym(handle, "cudft2048");
cudft2048((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]));
cudft2048((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]));
cudft2048((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]));
for (i = 0; i < 2048; i++)
{
printf("2048204820482048\n");
printf("a=%d\tb=%d\n", tmp[0][i],tmpo[0][i]);
}
dlclose(handle);
// dft2048((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),1);
// dft2048((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
// dft2048((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
dft2048((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),1);
dft2048((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
dft2048((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
/*
for (i=1; i<2048; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment