|
@@ -1,6 +1,6 @@
|
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
|
*
|
|
|
- * Copyright (C) 2009, 2010 Université de Bordeaux 1
|
|
|
+ * Copyright (C) 2009, 2010, 2013 Université de Bordeaux 1
|
|
|
* Copyright (C) 2010, 2011, 2013 Centre National de la Recherche Scientifique
|
|
|
*
|
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
@@ -33,6 +33,8 @@ struct _starpu_callback_list
|
|
|
struct _starpu_callback_list *next;
|
|
|
};
|
|
|
|
|
|
+/* This represents a data request, i.e. we want some data to get transferred
|
|
|
+ * from a source to a destination. */
|
|
|
LIST_TYPE(_starpu_data_request,
|
|
|
struct _starpu_spinlock lock;
|
|
|
unsigned refcnt;
|
|
@@ -41,23 +43,39 @@ LIST_TYPE(_starpu_data_request,
|
|
|
struct _starpu_data_replicate *src_replicate;
|
|
|
struct _starpu_data_replicate *dst_replicate;
|
|
|
|
|
|
+ /* Which memory node will actually perform the transfer */
|
|
|
unsigned handling_node;
|
|
|
|
|
|
+ /*
|
|
|
+ * What the destination node wants to do with the data: write to it,
|
|
|
+ * read it, or read and write to it. Only in the two latter cases we
|
|
|
+ * need an actual transfer, the first only needs an allocation.
|
|
|
+ *
|
|
|
+ * With mapped buffers, an additional case is mode = 0, which means
|
|
|
+ * unmapping the buffer.
|
|
|
+ */
|
|
|
enum starpu_access_mode mode;
|
|
|
|
|
|
+ /* Elements needed to make the transfer asynchronous */
|
|
|
struct _starpu_async_channel async_channel;
|
|
|
|
|
|
+ /* Whether the transfer is completed. */
|
|
|
unsigned completed;
|
|
|
+
|
|
|
+ /* Whether this is just a prefetch request */
|
|
|
unsigned prefetch;
|
|
|
+
|
|
|
+ /* The value returned by the transfer function */
|
|
|
int retval;
|
|
|
|
|
|
/* The request will not actually be submitted until there remains
|
|
|
* dependencies. */
|
|
|
unsigned ndeps;
|
|
|
|
|
|
- /* in case we have a chain of request (eg. for nvidia multi-GPU) */
|
|
|
+ /* in case we have a chain of request (eg. for nvidia multi-GPU), this
|
|
|
+ * is the list of requests which are waiting for this one. */
|
|
|
struct _starpu_data_request *next_req[STARPU_MAXNODES];
|
|
|
- /* who should perform the next request ? */
|
|
|
+ /* The number of requests in next_req */
|
|
|
unsigned next_req_count;
|
|
|
|
|
|
struct _starpu_callback_list *callbacks;
|