summaryrefslogtreecommitdiffstats
path: root/libdimension/progress-impl.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-02-17 13:55:09 -0500
committerTavian Barnes <tavianator@gmail.com>2011-02-17 13:55:09 -0500
commite0a1107cfcbb75ecb1f3a1342283e3f7e1417f6f (patch)
treecd96b6cea951cb6058cdd2efed2ff296b6e41b27 /libdimension/progress-impl.h
parentb53b1881417f040c85e1f47d1136f954217ad0e7 (diff)
downloaddimension-e0a1107cfcbb75ecb1f3a1342283e3f7e1417f6f.tar.xz
Get rid of the unused multi-level loop crap in dmnsn_progress* objects.
Diffstat (limited to 'libdimension/progress-impl.h')
-rw-r--r--libdimension/progress-impl.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/libdimension/progress-impl.h b/libdimension/progress-impl.h
index e9bfac6..87ad6c2 100644
--- a/libdimension/progress-impl.h
+++ b/libdimension/progress-impl.h
@@ -31,18 +31,16 @@
/** Allocate a new progress object. */
dmnsn_progress *dmnsn_new_progress(void);
-/** Create a new level of loop nesting. */
-void dmnsn_new_progress_element(dmnsn_progress *progress, unsigned int total);
-/** Increment the progress counter; should only be called from the innermost
- loop. */
+/** Set the total number of loop iterations. */
+void dmnsn_set_progress_total(dmnsn_progress *progress, size_t total);
+/** Increment the progress counter. */
void dmnsn_increment_progress(dmnsn_progress *progress);
/** Instantly complete the progress. */
void dmnsn_done_progress(dmnsn_progress *progress);
struct dmnsn_progress {
- /* Array of progress elements. Progress is given by P(0), where
- P(i) = (elements[i].progress + P(i + 1))/elements[i].total. */
- dmnsn_array *elements;
+ size_t progress; /**< Completed loop iterations. */
+ size_t total; /**< Total expected loop iterations. */
/* The worker thread */
pthread_t thread;