From 1e1fd628207034b0412c50e289f146d34c5baf71 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 14 Mar 2025 16:18:29 +0100 Subject: Replaced datasize with solverinfo --- src/nissy.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/nissy.h') diff --git a/src/nissy.h b/src/nissy.h index 6c5a3e6..23bcb8b 100644 --- a/src/nissy.h +++ b/src/nissy.h @@ -25,6 +25,7 @@ for example 'rotation UF' or 'mirrored BL'. #define NISSY_SIZE_H48 88U #define NISSY_SIZE_TRANSFORMATION 12U #define NISSY_SIZE_SOLVE_STATS 10U +#define NISSY_DATAID_SIZE 255U /* Flags for NISS options */ #define NISSY_NISSFLAG_NORMAL 1U @@ -191,11 +192,15 @@ nissy_getcube( ); /* -Compute the size of the data generated by nissy_gendata, when called with -the same parameters, or -1 in case of error. +Compute the size of the data generated by nissy_gendata when called for +the given solver, and other useful information. Parameters: solver - The name of the solver. + dataid - An identifier for the data computed for the solver. Different + solver may use equivalent data. This identifier can be used + e.g. as a filename or database key to save and retrieve the + correct data for each solver, without duplication. Return values: NISSY_ERROR_INVALID_SOLVER - The given solver is not known. @@ -204,8 +209,9 @@ Return values: Any value >= 0 - The size of the data, in bytes. */ long long -nissy_datasize( - const char *solver +nissy_solverinfo( + const char *solver, + char dataid[static NISSY_DATAID_SIZE] ); /* -- cgit v1.3