forked from openucx/ucx
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UCP: Strided (Non-contiguous) memory send/recv support (openucx#7/7)
- Loading branch information
Showing
15 changed files
with
498 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. | ||
* | ||
* See file LICENSE for terms. | ||
*/ | ||
|
||
#include "dt_reusable.h" | ||
|
||
#include <ucs/sys/compiler.h> | ||
|
||
|
||
void ucp_dt_reusable_completion(uct_completion_t *self, ucs_status_t status) | ||
{ | ||
ucp_dt_reusable_t *reusable = ucs_container_of(self, ucp_dt_reusable_t, nc_comp); | ||
reusable->nc_status = status; | ||
} | ||
|
||
void ucp_dt_reusable_destroy(ucp_dt_reusable_t *reusable) { | ||
uct_md_mem_dereg(reusable->nc_md, reusable->nc_memh); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. | ||
* | ||
* See file LICENSE for terms. | ||
*/ | ||
|
||
|
||
#ifndef UCP_DT_REUSABLE_H_ | ||
#define UCP_DT_REUSABLE_H_ | ||
|
||
#include <ucp/api/ucp.h> | ||
#include <uct/api/uct.h> | ||
|
||
#define UCP_DT_IS_REUSABLE(_datatype) \ | ||
((((_datatype) & UCP_DATATYPE_CLASS_MASK) == UCP_DATATYPE_IOV_R) || \ | ||
(((_datatype) & UCP_DATATYPE_CLASS_MASK) == UCP_DATATYPE_STRIDE_R)) | ||
|
||
#define UCP_DT_GET_REUSABLE(_datatype) (&ucp_dt_ptr(_datatype)->reusable) | ||
|
||
typedef struct ucp_dt_reusable { | ||
size_t length; /* Optimization: cache the length of the datatype */ | ||
union { | ||
uct_mem_h* iov_memh; /* Array of (UCP-)IOV memory handles */ | ||
uct_mem_h stride_memh;/* Handle for the full extent of the stride */ | ||
}; | ||
|
||
uct_mem_h nc_memh; /* Non-contiguous registration - single handle */ | ||
uct_md_t *nc_md; /* Memory domain used for creating contig_memh */ | ||
uct_completion_t nc_comp; /* Non-contiguous registration completion */ | ||
ucs_status_t nc_status; /* Non-contiguous registration status */ | ||
uct_iov_t *nc_iov; /* Optimization: cache the registration layout */ | ||
size_t nc_iovcnt; /* - and the registration layout length */ | ||
} ucp_dt_reusable_t; | ||
|
||
void ucp_dt_reusable_destroy(ucp_dt_reusable_t *dt); | ||
|
||
void ucp_dt_reusable_completion(uct_completion_t *self, ucs_status_t status); | ||
|
||
#endif |
Oops, something went wrong.