     
     if (traits.flags & GHOST_SPMV_DOT) {
         PERFWARNING_LOG("Dot product computation will be not be done on-the-fly!");
-        memset(localdot,0,lhs->traits.ncols*3*sizeof(dt1));
+        memset(localdot,0,lhs->traits.ncols*3*sizeof(dt));
         if (traits.flags & GHOST_SPMV_DOT_YY) {
             ghost_localdot(&localdot[0],lhs,lhs);
         }


    if (mat->traits.datatype & GHOST_DT_DOUBLE) {
        if (mat->traits.datatype & GHOST_DT_REAL) {
            GHOST_CALL_GOTO((ghost_cu_sell1spmv_augfunc_tmpl<double,double>(lhs_in,rhs_in,traits)),err,ret);
        } else {
            GHOST_CALL_GOTO((ghost_cu_sell1spmv_augfunc_tmpl<cuDoubleComplex,std::complex<double> >(lhs_in,rhs_in,traits)),err,ret);
        }
    } else {
        if (mat->traits.datatype & GHOST_DT_REAL) {
            GHOST_CALL_GOTO((ghost_cu_sell1spmv_augfunc_tmpl<float,float>(lhs_in,rhs_in,traits)),err,ret);
        } else {
            GHOST_CALL_GOTO((ghost_cu_sell1spmv_augfunc_tmpl<cuFloatComplex,std::complex<float> >(lhs_in,rhs_in,traits)),err,ret);
        }
    }
    

    return GHOST_SUCCESS;
}
    
    template<typename dt>
static ghost_error ghost_cu_sell1spmv_augfunc_tmpl(ghost_densemat * lhs, ghost_densemat * rhs, ghost_spmv_opts traits)
{
    dt *localdot = NULL;
    dt *shift = NULL, scale, __attribute__((unused)) beta, sdelta, seta;
    ghost_densemat *z = NULL;

    scale = 1.; //required because we need scale for SHIFT (i.e., even if we don't SCALE)
    GHOST_SPMV_PARSE_TRAITS(traits,scale,beta,shift,localdot,z,sdelta,seta,dt,dt);

    if (traits.flags & (GHOST_SPMV_SHIFT|GHOST_SPMV_VSHIFT)) {
        PERFWARNING_LOG("Shift will not be applied on-the-fly!");
        dt minusshift[rhs->traits.ncols];
        ghost_lidx col;
        if (traits.flags & GHOST_SPMV_SHIFT) {
            for (col=0; col<rhs->traits.ncols; col++) {
                minusshift[col] = (dt)-1.*(*(dt *)&scale)*(*(dt *)shift);
            }
        } else {
            for (col=0; col<rhs->traits.ncols; col++) {
                minusshift[col] = (dt)-1.*(*(dt *)&scale)*(((dt *)shift)[col]);
            }
        }
        ghost_vaxpy(lhs,rhs,minusshift);
