Skip to content

Commit

Permalink
DF behaviour: Allow zero-horizon windows/views
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuno Miguel Nobre committed Jun 26, 2020
1 parent d7dd0ca commit b89aef7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libworkstream_df/reuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ void __built_in_wstream_df_prepare_data(void* v)
wstream_df_view_p out_view = v;
int force_reuse = 0;

if (!out_view->horizon)
return;

/* View of a direct consumer of the task to be executed */
wstream_df_view_p consumer_view = out_view->consumer_view;

Expand Down
9 changes: 9 additions & 0 deletions libworkstream_df/wstream_df.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ void update_numa_nodes_of_views(wstream_df_thread_p cthread, wstream_df_frame_p
static inline void
tdecrease_n (void *data, size_t n, bool is_write)
{
if (!n)
return;

wstream_df_frame_p fp = (wstream_df_frame_p) data;
wstream_df_thread_p cthread = current_thread;
Expand Down Expand Up @@ -718,6 +720,13 @@ wstream_df_resolve_dependences (void *v, void *s, bool is_read_view_p)
wstream_df_frame_p fp = view->owner;
int defer_further = 0;

if (!view->horizon)
{
if (!is_read_view_p)
tdecrease_n (fp, 1, 0);
return;
}

if(is_read_view_p)
check_add_view_to_chain(&fp->input_view_chain, view);
else
Expand Down

0 comments on commit b89aef7

Please sign in to comment.