 
 
 __global__ void bessel_lo_inner_product_gpu_kernel(int max_num_mt_points, int lmax_pw, int num_atom_types, int num_gkvec, 
-                                                   double* bessel, double* lo, int* l_by_ilo, int* iat_by_ilo, 
-                                                   int* nmtp_by_ilo, double* r_dr, double* result)
+                                                   double* jl_coefs, double* lo_coefs, int* l_by_ilo, int* iat_by_ilo, 
+                                                   int* nmtp_by_ilo, double* r_dr, double* jlo)
 {
     int igk = blockIdx.x;
     int ilo = blockIdx.y;

    int c_offs = 2 * ld;
    int d_offs = 3 * ld;

    sdata[threadIdx.x] = 0.0;

    for (int n = 0; n < N; n++)
    {


    cudaFree(d_result);
    free(h_result);
    
    //cuDoubleComplex* d_zresult;
    //cudaMalloc(&d_zresult, 1 * sizeof(cuDoubleComplex));
    //
    //cuDoubleComplex* zs2;
    //cudaMalloc(&zs2, size * 4 * sizeof(cuDoubleComplex));
    //
    //for (int i = 0; i < size * 4; i++) zs2[i] = make_cuDoubleComplex(s2_coefs[i], s2_coefs[i]);

    //spline_inner_product_gpu_kernel<<<numBlocks, threadsPerBlock, 64 * 16>>>(size, size, r_dr, s1_coefs, zs2, d_zresult);

    //cuDoubleComplex* h_zresult = (cuDoubleComplex*)malloc(1 * sizeof(cuDoubleComplex));
    //cudaMemcpy(h_zresult, d_zresult, 1 * sizeof(cuDoubleComplex), cudaMemcpyDeviceToHost);

    //printf("GPU result : %18.12f %18.12f\n", h_zresult[0].x, h_zresult[0].y);

    //cudaFree(d_zresult);
    //free(h_zresult);
    //free(zs2);
}

template void spline_inner_product_gpu<double>(int size, double* r_dr, double* s1_coefs, double* s2_coefs);
