2016-09-07 20:01:34 +00:00
|
|
|
/**
|
2016-09-11 20:20:15 +00:00
|
|
|
* Author......: See docs/credits.txt
|
2016-09-07 20:01:34 +00:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _RESTORE_H
|
|
|
|
#define _RESTORE_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
2016-09-07 20:29:57 +00:00
|
|
|
#if defined (_POSIX)
|
2016-09-07 20:01:34 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#endif // _POSIX
|
|
|
|
|
2016-09-07 20:29:57 +00:00
|
|
|
#if defined (_WIN)
|
2016-09-07 20:01:34 +00:00
|
|
|
#include <windows.h>
|
2016-09-07 20:04:04 +00:00
|
|
|
#include <psapi.h>
|
2016-09-07 20:01:34 +00:00
|
|
|
#endif // _WIN
|
|
|
|
|
|
|
|
#define RESTORE_VERSION_MIN 320
|
|
|
|
#define RESTORE_VERSION_CUR 320
|
|
|
|
|
2016-09-15 14:02:52 +00:00
|
|
|
u64 get_lowest_words_done (opencl_ctx_t *opencl_ctx);
|
2016-09-07 20:01:34 +00:00
|
|
|
|
2016-09-22 12:45:00 +00:00
|
|
|
restore_data_t *init_restore (int argc, char **argv, const user_options_t *user_options);
|
2016-09-07 20:01:34 +00:00
|
|
|
|
|
|
|
void read_restore (const char *eff_restore_file, restore_data_t *rd);
|
|
|
|
|
2016-09-15 14:02:52 +00:00
|
|
|
void write_restore (opencl_ctx_t *opencl_ctx, const char *new_restore_file, restore_data_t *rd);
|
2016-09-07 20:01:34 +00:00
|
|
|
|
2016-09-15 14:02:52 +00:00
|
|
|
void cycle_restore (opencl_ctx_t *opencl_ctx);
|
2016-09-07 20:01:34 +00:00
|
|
|
|
2016-09-22 12:45:00 +00:00
|
|
|
void stop_at_checkpoint (opencl_ctx_t *opencl_ctx, const user_options_t *user_options);
|
2016-09-14 14:07:24 +00:00
|
|
|
|
2016-09-07 20:01:34 +00:00
|
|
|
#endif // _RESTORE_H
|