     int max_station_blocks = (num_stations + block_size - 1) / block_size;
     dim3 num_blocks(num_stations, max_station_blocks);
     size_t shared_mem = num_threads.x * sizeof(float4c); /* acc. buffer */
-    shared_mem += num_threads.x * sizeof(float4c);       /* Jones cache */
-    shared_mem += block_size * sizeof(float4c);          /* vis baseline buffer */
-    shared_mem += num_threads.x * sizeof(float) * 4;     /* Source brightness */
-    shared_mem += num_threads.x * sizeof(float) * 3;     /* Source coords */
-
     oskar_correlate_point_time_smearing_cudak_2_f
     OSKAR_CUDAK_CONF(num_blocks, num_threads, shared_mem)
     (num_sources, num_stations, d_jones, d_source_I, d_source_Q, d_source_U,

        /* global source index */
        int t = sb * blockDim.x + threadIdx.x;

        /* Cache common values: StationI Jones matrices & source parameters */
        if (t < num_sources)
        {
            stationI[threadIdx.x] = jones[num_sources * blockIdx.x + t];
            sourceI[threadIdx.x]  = source_I[t];
            sourceQ[threadIdx.x]  = source_Q[t];
            sourceU[threadIdx.x]  = source_U[t];
            sourceV[threadIdx.x]  = source_V[t];
            sourceL[threadIdx.x]  = source_l[t];
            sourceM[threadIdx.x]  = source_m[t];
            sourceN[threadIdx.x]  = source_n[t];
        }

        /* Loop over other that make up the baseline handled by this thread block */
        for (int j = 0; j < STATION_BLOCK_SIZE; ++j)
        {
            /* global J station index */
            int idxStationJ = sJ0 + (blockIdx.y * STATION_BLOCK_SIZE) + j;
            if (idxStationJ < num_stations)
            {
                const float4c * __restrict__ stationJ = &jones[num_sources * idxStationJ];

                float l = sourceL[threadIdx.x];
                float m = sourceM[threadIdx.x];
                float n = sourceN[threadIdx.x];

                /* Compute bandwidth-smearing term. */
                float rb = oskar_sinc_f(uu[j] * l + vv[j] * m);

                /* Accumulate baseline visibility response for source. */
                if (t < num_sources)
                {
                    float4c m1 = stationI[t];
                    float4c m2;
                    float I = source_I[t];
                    float Q = source_Q[t];
                    m2.a.x = I + Q;
                    m2.b.x = source_U[t];
                    m2.b.y = source_V[t];
                    m2.d.x = I - Q;

                    /* Multiply first Jones matrix with source brightness matrix. */
