 
         idx = threadIdx.x - offset;
         // add +1.0f because we must shift by 0.5 pixels upscaled by 2 in the previous octave
-        val = tex2D<float>( src_data, 2 * ( block_x + idx ) + 1.0, 2 * ( block_y + idy ) + 1.0 );
+        val = tex2D<float>( src_data, 2 * ( block_x + idx ) + 1.0f, 2 * ( block_y + idy ) + 1.0f );
         out += ( val * g );
 
         idx = threadIdx.x + offset;
-        val = tex2D<float>( src_data, 2 * ( block_x + idx ) + 1.0, 2 * ( block_y + idy ) + 1.0 );
+        val = tex2D<float>( src_data, 2 * ( block_x + idx ) + 1.0f, 2 * ( block_y + idy ) + 1.0f );
         out += ( val * g );
     }
 
     g  = popart::d_gauss_filter[level*GAUSS_ALIGN];
     idx = threadIdx.x;
-    val = tex2D<float>( src_data, 2 * ( block_x + idx ) + 1.0, 2 * ( block_y + idy ) + 1.0 );
+    val = tex2D<float>( src_data, 2 * ( block_x + idx ) + 1.0f, 2 * ( block_y + idy ) + 1.0f );
     out += ( val * g );
 
     idx = block_x+threadIdx.x;


    if( off_x >= dst_w ) return;

    float out = 0;

    #pragma unroll
    for( int offset = GAUSS_SPAN; offset>0; offset-- ) {
        const float& g  = popart::d_gauss_filter[level*GAUSS_ALIGN + offset];
        const float  v1 = tex2D<float>( src_data, off_x - offset + 0.5, blockIdx.y + 0.5 );
        out += ( v1 * g );

        const float  v2 = tex2D<float>( src_data, off_x + offset + 0.5, blockIdx.y + 0.5 );
        out += ( v2 * g );
    }
    const float& g  = popart::d_gauss_filter[level*GAUSS_ALIGN];
    const float v3 = tex2D<float>( src_data, off_x+0.5, blockIdx.y+0.5 );
    out += ( v3 * g );

    dst_data.ptr(blockIdx.y)[off_x] = out;

        g  = popart::d_gauss_filter[level*GAUSS_ALIGN + offset];

        idy = threadIdx.y - offset;
        val = tex2D<float>( src_data, block_x + idx + 0.5f, block_y + idy + 0.5f );
        out += ( val * g );

        idy = threadIdx.y + offset;
        val = tex2D<float>( src_data, block_x + idx + 0.5f, block_y + idy + 0.5f );
        out += ( val * g );
    }

    g  = popart::d_gauss_filter[level*GAUSS_ALIGN];
    idy = threadIdx.y;
    val = tex2D<float>( src_data, block_x + idx + 0.5f, block_y + idy + 0.5f );
    out += ( val * g );

    idx = block_x+threadIdx.x;
