ENH: Only sets the GPU flag has dirty when Allocating. This avoids doing an unnecessary memory transfer from  GPU -> CPU
COMP: Fixing export symbols for Windows DLL