made cuda malloc and free functions for maps and coefs