| 53 | } |
| 54 | |
| 55 | bool getBatch(void* bindings[], const char* names[], int nbBindings) noexcept |
| 56 | { |
| 57 | if (!mStream.next()) |
| 58 | { |
| 59 | return false; |
| 60 | } |
| 61 | CHECK(cudaMemcpy(mDeviceInput, mStream.getBatch(), mInputCount * sizeof(float), cudaMemcpyHostToDevice)); |
| 62 | ASSERT(!strcmp(names[0], mInputBlobName)); |
| 63 | bindings[0] = mDeviceInput; |
| 64 | return true; |
| 65 | } |
| 66 | |
| 67 | const void* readCalibrationCache(size_t& length) noexcept |
| 68 | { |