fixed memcpy so that the arguments for cudaMemcpy are allways correct.
detremineDimension can now be called from both device and host code
cleanup and documented some functions.
copyBackAndWrite and quickCopy have been commented out because they
are trivial and do not belong in a utility library.