sum2 <-
function(m) {
    res = .C("sum2"
             ,mtrx=as.double(m)
             ,m=as.integer(dim(m)[1])
             ,n=as.integer(dim(m)[2])
             ,res=as.double(0)
            )

    return(res$res)
}
