You can get the pointer to the array using vector.front().
int size = matrix.size() * sizeof(Type);
cudaMemcpy(dev_ptr, matrix.front(), size, cudaMemcpyHostToDevice);
But seriously, you shouldn’t use vector to do this unless the size of a specific matrix could change during runtime, which I believe is not what you need.
Are you reading from text files? Better do it with binary files; that’s much easier and faster. Of course, if you want the data on your GPU to be stored linearly, there’s nothing you’ll need to do apart from the direct copying shown above. I believe this would be the case for you, if your calculations on those matrices aren’t exactly peculiar.