Jens Axboe | 8055e41 | 2012-11-26 08:43:47 +0100 | [diff] [blame] | 1 | #ifndef FIO_LFSR_H |
| 2 | #define FIO_LFSR_H |
| 3 | |
| 4 | #include <inttypes.h> |
| 5 | |
| 6 | #define FIO_MAX_TAPS 8 |
| 7 | |
| 8 | struct lfsr_taps { |
| 9 | unsigned int length; |
| 10 | unsigned int taps[FIO_MAX_TAPS]; |
| 11 | }; |
| 12 | |
| 13 | |
| 14 | struct fio_lfsr { |
| 15 | uint64_t last_val; |
| 16 | uint64_t max_val; |
| 17 | uint64_t num_vals; |
| 18 | struct lfsr_taps taps; |
| 19 | }; |
| 20 | |
| 21 | int lfsr_next(struct fio_lfsr *fl, uint64_t *off); |
Jens Axboe | 82af46b | 2012-12-04 13:12:25 +0100 | [diff] [blame] | 22 | int lfsr_init(struct fio_lfsr *fl, uint64_t size, unsigned long seed); |
Jens Axboe | 8055e41 | 2012-11-26 08:43:47 +0100 | [diff] [blame] | 23 | |
| 24 | #endif |