getDeviceAPI(name) {
	        if (name == "deviceAllocDataSpace") {
	            return (nbytes) => {
	                return this.deviceAllocDataSpace(nbytes);
	            };
	        }
	        else if (name == "deviceFreeDataSpace") {
	            return (ptr) => {
	                return this.deviceFreeDataSpace(ptr);
	            };
	        }
	        else if (name == "deviceCopyToGPU") {
	            return (from, to, toOffset, nbytes) => {
	                this.deviceCopyToGPU(from, to, toOffset, nbytes);
	            };
	        }
	        else if (name == "deviceCopyFromGPU") {
	            return (from, fromOffset, to, nbytes) => {
	                this.deviceCopyFromGPU(from, fromOffset, to, nbytes);
	            };
	        }
	        else if (name == "deviceCopyWithinGPU") {
	            return (from, fromOffset, to, toOffset, nbytes) => {
	                this.deviceCopyWithinGPU(from, fromOffset, to, toOffset, nbytes);
	            };
	        }
	        else {
	            throw new Error("Unknown DeviceAPI function " + name);
	        }
	    }
Get the device API according to its name
@param The name of the API.
@returns The corresponding device api.