/*
 * call-seq: _load
 *
 * For Marshal.  Uses native data format.
 *
 */
VALUE rb_dmatrix_s_marshal_load(VALUE klass, VALUE str)
{
    DMatrix* a ;
    integer vsize ;
    integer hsize ;
    char* p = RSTRING_PTR(str) ;

    vsize = *((integer*)p) ;
    p += sizeof(integer) ;

    hsize = *((integer*)p) ;
    p += sizeof(integer) ;

    p += 40*sizeof(char) ;

    a = DMatrix_new(vsize, hsize) ;
    memcpy((void*)a->data, (void*)p, vsize*hsize*sizeof(doublereal)) ;

    return wrap_dmatrix(a) ;
}