| 7 | namespace stream { |
| 8 | |
| 9 | Prefetch::Prefetch( |
| 10 | const std::shared_ptr<Stream>& stream, |
| 11 | int prefetch_size, |
| 12 | int num_thread) |
| 13 | : stream_(stream), |
| 14 | pool_(std::make_shared<core::ThreadPool>(num_thread)), |
| 15 | prefetchSize_(prefetch_size) { |
| 16 | if (prefetchSize_ < 0) { |
| 17 | throw std::runtime_error("Prefetch: prefetch size must be positive"); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | Prefetch::~Prefetch() { |
| 22 | std::unique_lock lock(mutex_); |
nothing calls this directly
no outgoing calls
no test coverage detected