         const oskar_Mem* m, const oskar_Mem* n, oskar_Mem* theta,
         oskar_Mem* phi)
 {
-    int error, type, num_sources;
+    int error, double_precision, num_sources, num_blocks, num_threads;
 
     /* Check that the output array is complex. */
     if (!oskar_mem_is_complex(G->type))

            G->location != OSKAR_LOCATION_GPU)
        return OSKAR_ERR_BAD_LOCATION;

    /* Check if output array is matrix type. */
    if (oskar_mem_is_matrix(G->type) && model->polarised)
    {
    	/* Evaluate polarised response. */

    	/* Check if spline data is present. */

    }
    else if (oskar_mem_is_scalar(G->type) && !model->polarised)
    {
    	/* Evaluate scalar response. */
    }
    else
    	return OSKAR_ERR_BAD_DATA_TYPE;

    return 0;
}


#include "station/oskar_element_model_evaluate.h"

#define PIf 3.14159265358979323846f
#define PI  3.14159265358979323846

__global__
void oskar_cudak_hor_lmn_to_modified_theta_phi_f(const int num,
        const float* l, const float* m, const float* n,
        const float orientation, float* theta, float* phi)
{
    // Get the position ID that this thread is working on.
    const int i = blockDim.x * blockIdx.x + threadIdx.x;
    if (i >= num) return;

    // Get the data.
    float x = l[i];
    float y = m[i];
    float z = n[i];

    // Cartesian to spherical (with orientation offset).
    float p = atan2f(y, x) - orientation;
    p = fmodf(p, 2.0f * PIf);
    if (p < 0) p += 2.0f * PIf; // Phi in range 0 to 2 pi.
    x = sqrtf(x*x + y*y);
    y = atan2f(x, z); // Theta.
    phi[i] = p;
    theta[i] = y;
}

#ifdef __cplusplus
extern "C" {
#endif
