| 117 | std::make_shared<stream::Prefetch>(self_, prefetch_size, num_thread)); |
| 118 | } |
| 119 | Stream Stream::prefetch_if(bool cond, int prefetch_size, int num_thread) const { |
| 120 | if (cond) { |
| 121 | return prefetch(prefetch_size, num_thread); |
| 122 | } else { |
| 123 | return Stream(self_); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | Stream Stream::repeat(int64_t num_time) const { |
| 128 | return Stream(std::make_shared<stream::Repeat>(self_, num_time)); |