fixed a syntax bug and implented gpu.cpp