Hi
I’m trying to call kernel function .cpp + .cu
In .cpp ,
I called
…
extern “C” void Kernel_Hilbert(cufftComplex *a, float *b, int Width, int Height);
…
Kernel_Hilbert(d_input_value, d_pointwise_coeff,(int)TWIDTH,(int)THEIGHT);
and
In .cu ,
#include <cuda.h>
#include <cufft.h>
#include "device_launch_parameters.h"
extern "C" void Kernel_Hilbert(cufftComplex *a, float *b, int Width, int Height)
{
Kernel_pointproduct<<<1,Width>>>(a, b,Width,Height);
}
__global__ void Kernel_pointproduct(cufftComplex *a, float *b, int Width, int Height){
int tid = blockDim.x * blockIdx.x + threadIdx.x;
if(tid < Width){
for(int i=0; i<Height; i++){
a[i*Width+tid].x = a[i*Width+tid].x * b[tid];
a[i*Width+tid].y = a[i*Width+tid].y * b[tid];
}
}
}
But there is an error.
the error said
“Kernel_pointproduct” is undefined
anyone have an idea to solve it?
Thank you!