         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))


#include "station/oskar_element_model_evaluate.h"

#ifdef __cplusplus
extern "C" {
#endif

            G->location != OSKAR_LOCATION_GPU)
        return OSKAR_ERR_BAD_LOCATION;

    /* Check whether single or double precision. */
    double_precision = oskar_mem_is_double(G->type);

    /* Get number of sources. */
    num_sources = l->num_elements;

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

        }
        else
        {
            /* Compute modified theta and phi coordinates for dipole X.
             * Modify true values using orientation parameter. */
            num_threads = 256;
            num_blocks = (num_sources + num_threads - 1) / num_threads;
            oskar_cudak_hor_lmn_to_modified_theta_phi_f
            OSKAR_CUDAK_CONF(num_blocks, num_threads) (num_sources,
                    ((const float*)l->data), ((const float*)m->data),
                    ((const float*)n->data), 0.5 * PIf - orientation_x,
                    ((float*)theta->data), ((float*)phi->data));

            /* Check if spline data present for dipole X. */
            if (model->theta_re_x.coeff.data && model->theta_im_x.coeff.data &&
                    model->phi_re_x.coeff.data && model->phi_im_x.coeff.data)
            {
                /* Evaluate spline pattern for dipole X. */
            }
            else
            {
                /* Evaluate tapered dipole pattern for dipole X. */
            }

            /* Compute modified theta and phi coordinates for dipole Y.
             * Modify true values using orientation parameter. */

            /* Check if spline data present for dipole Y. */
            if (model->theta_re_y.coeff.data && model->theta_im_y.coeff.data &&
                    model->phi_re_y.coeff.data && model->phi_im_y.coeff.data)
            {
                /* Evaluate spline pattern for dipole Y. */
            }
            else
            {
                /* Evaluate tapered dipole pattern for dipole Y. */
            }
        }
    }

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

    return 0;
}
