diff options
author | 2020-02-17 00:10:12 +0200 | |
---|---|---|
committer | 2020-02-17 00:10:12 +0200 | |
commit | 790d6dcfc531005a5d7ca2f79460d593d61bb1a0 (patch) | |
tree | bf52eaa23dff4e4a9002228dd29d5472352e5bd7 /src/io.h | |
parent | 3fa68c95644b9a69c0e519987577fb1bb57bf1dc (diff) | |
download | algos-ld1-790d6dcfc531005a5d7ca2f79460d593d61bb1a0.tar.gz algos-ld1-790d6dcfc531005a5d7ca2f79460d593d61bb1a0.tar.bz2 algos-ld1-790d6dcfc531005a5d7ca2f79460d593d61bb1a0.zip |
now sets proper stride.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/io.h')
-rw-r--r-- | src/io.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -2,15 +2,28 @@ #define ALGOS_IO_H_INCLUDED #include <stddef.h> +#include <stdint.h> struct stream { size_t n; size_t stride; + ssize_t last_idx; int fd; int out; char *name; }; +/* for array implementation */ +struct entry_a { + uint64_t val; +}; + +/* for linked list implementation */ +struct entry_l { + uint32_t i; /* "pointer" to the next element. */ + uint64_t val; +}; + int stream_open(struct stream *in); int stream_close(struct stream *in); |