* Synchronize the device
()
| 370 | * Synchronize the device |
| 371 | */ |
| 372 | async sync(): Promise<void> { |
| 373 | if (this.deviceType === DeviceStrToEnum.webgpu) { |
| 374 | assert(this.lib.webGPUContext !== undefined); |
| 375 | await this.lib.webGPUContext.sync(); |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | toString(): string { |
| 380 | return ( |