     CURAND_CALL_RETURN(curandCreateGenerator(&gen,CURAND_RNG_PSEUDO_DEFAULT));
     CURAND_CALL_RETURN(curandSetPseudoRandomGeneratorSeed(gen,ghost_hash(int(time),clock(),pid)));
 
+    vec->clone(vec,&onevec,vec->traits.nrows,0,vec->traits.ncols,0);
+    double one[] = {1.,1.};
+    onevec->fromScalar(onevec,one);
+
+    one[1] = 0.;
+    float fone[] = {1.,0.};
+    double minusahalf[] = {-0.5,0.};
+    float fminusahalf[] = {-0.5,0.};
+
     ghost_idx_t v;
     for (v=0; v<vec->traits.ncols; v++)
     {

            }
        }
    }

    return GHOST_SUCCESS;
}


extern "C" ghost_error_t ghost_densemat_cm_cu_fromRand(ghost_densemat_t *vec)
{
    ghost_densemat_t *onevec;
    long pid = getpid();
    double time;
    ghost_timing_wcmilli(&time);
