| 506 | } |
| 507 | |
| 508 | port::Status GpuExecutor::SynchronousMemSet(DeviceMemoryBase* location, |
| 509 | int value, uint64 size) { |
| 510 | if (reinterpret_cast<uintptr_t>(location->opaque()) % 4 == 0 && |
| 511 | size % 4 == 0) { |
| 512 | // hipMemset reinterprets "value" as a uint8. |
| 513 | uint8 byte_value = static_cast<uint8>(value); |
| 514 | uint32 pattern = (byte_value << 24) | (byte_value << 16) | |
| 515 | (byte_value << 8) | byte_value; |
| 516 | return GpuDriver::SynchronousMemsetUint32( |
| 517 | context_, AsROCmDevicePtr(location), pattern, size / 4); |
| 518 | } |
| 519 | return GpuDriver::SynchronousMemsetUint8(context_, AsROCmDevicePtr(location), |
| 520 | value, size); |
| 521 | } |
| 522 | |
| 523 | port::Status GpuExecutor::SynchronousMemcpy(DeviceMemoryBase* gpu_dst, |
| 524 | const void* host_src, uint64 size) { |
nothing calls this directly
no test coverage detected