Skip to content

Commit db6cbb6

Browse files
authored
Merge pull request #462 from dash-project/dart-feat-strides
Add support for extended data types in DART
2 parents 83c85da + a09a043 commit db6cbb6

23 files changed

+1934
-1465
lines changed

circle.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ test:
2121
parallel: true
2222
- bash ./dash/scripts/circleci/run-docker.sh Minimal gnu:
2323
parallel: true
24-
- bash ./dash/scripts/circleci/run-docker.sh Nasty gnu:
25-
parallel: true
24+
# - bash ./dash/scripts/circleci/run-docker.sh Nasty gnu:
25+
# parallel: true
2626
- bash ./dash/scripts/circleci/run-docker.sh Release clang:
2727
parallel: true
2828
- grep "FAIL" ./dash-ci.log && (echo "Full log:" ; cat ./dash-ci.log ; exit 1) || exit 0:

dart-if/include/dash/dart/if/dart_communication.h

+54-73
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,13 @@ dart_ret_t dart_compare_and_swap(
329329
* is guaranteed. A later flush operation is needed to guarantee
330330
* local and remote completion.
331331
*
332-
* \param dest The local destination buffer to store the data to.
333-
* \param gptr A global pointer determining the source of the get operation.
334-
* \param nelem The number of elements of type \c dtype to transfer.
335-
* \param dtype The data type of the values in buffer \c dest.
332+
* \param dest The local destination buffer to store the data to.
333+
* \param gptr A global pointer determining the source of the get operation.
334+
* \param nelem The number of elements of type \c dtype to transfer.
335+
* \param src_type The data type of the values at the source.
336+
* \param dst_type The data type of the values in buffer \c dest.
337+
*
338+
* \note Base-type conversion is not performed.
336339
*
337340
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
338341
*
@@ -343,7 +346,8 @@ dart_ret_t dart_get(
343346
void * dest,
344347
dart_gptr_t gptr,
345348
size_t nelem,
346-
dart_datatype_t dtype) DART_NOTHROW;
349+
dart_datatype_t src_type,
350+
dart_datatype_t dst_type) DART_NOTHROW;
347351

348352
/**
349353
* 'REGULAR' variant of dart_put.
@@ -352,10 +356,13 @@ dart_ret_t dart_get(
352356
* is guaranteed. A later flush operation is needed to guarantee
353357
* local and remote completion.
354358
*
355-
* \param gptr A global pointer determining the target of the put operation.
356-
* \param src The local source buffer to load the data from.
357-
* \param nelem The number of elements of type \c dtype to transfer.
358-
* \param dtype The data type of the values in buffer \c src.
359+
* \param gptr A global pointer determining the target of the put operation.
360+
* \param src The local source buffer to load the data from.
361+
* \param nelem The number of elements of type \c dtype to transfer.
362+
* \param src_type The data type of the values in buffer \c src.
363+
* \param dst_type The data type of the values at the target.
364+
*
365+
* \note Base-type conversion is not performed.
359366
*
360367
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
361368
*
@@ -366,7 +373,8 @@ dart_ret_t dart_put(
366373
dart_gptr_t gptr,
367374
const void * src,
368375
size_t nelem,
369-
dart_datatype_t dtype) DART_NOTHROW;
376+
dart_datatype_t src_type,
377+
dart_datatype_t dst_type) DART_NOTHROW;
370378

371379

372380
/**
@@ -453,49 +461,6 @@ dart_ret_t dart_flush_local_all(
453461
*/
454462
typedef struct dart_handle_struct * dart_handle_t;
455463

456-
typedef enum {
457-
STRIDED_TO_STRIDED = 0,
458-
STRIDED_TO_CONTIG,
459-
CONTIG_TO_STRIDED
460-
} dart_stride_option;
461-
462-
dart_ret_t dart_get_strided_handle(
463-
void * dest,
464-
dart_gptr_t gptr,
465-
size_t nblocks,
466-
size_t nelems_block,
467-
size_t stride,
468-
dart_datatype_t dtype,
469-
dart_stride_option stride_opt,
470-
dart_handle_t * handle);
471-
472-
dart_ret_t dart_get_indexed_handle(
473-
void * dest,
474-
dart_gptr_t gptr,
475-
size_t nblocks,
476-
size_t nelems_block,
477-
int* indexes,
478-
dart_datatype_t dtype,
479-
dart_stride_option stride_opt,
480-
dart_handle_t * handle);
481-
482-
/**
483-
* 'HANDLE' variant of dart_get.
484-
* Neither local nor remote completion is guaranteed. A later
485-
* dart_wait*() call or a fence/flush operation is needed to guarantee
486-
* completion.
487-
*
488-
* \param dest Local target memory to store the data.
489-
* \param gptr Global pointer being the source of the data transfer.
490-
* \param nelem The number of elements of \c dtype in buffer \c dest.
491-
* \param dtype The data type of the values in buffer \c dest.
492-
* \param[out] handle Pointer to DART handle to instantiate for later use with \c dart_wait, \c dart_wait_all etc.
493-
*
494-
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
495-
*
496-
* \threadsafe
497-
* \ingroup DartCommunication
498-
*/
499464
#define DART_HANDLE_NULL (dart_handle_t)NULL
500465

501466
/**
@@ -504,12 +469,15 @@ dart_ret_t dart_get_indexed_handle(
504469
* dart_wait*() call or a fence/flush operation is needed to guarantee
505470
* completion.
506471
*
507-
* \param dest Local target memory to store the data.
508-
* \param gptr Global pointer being the source of the data transfer.
509-
* \param nelem The number of elements of \c dtype in buffer \c dest.
510-
* \param dtype The data type of the values in buffer \c dest.
472+
* \param dest Local target memory to store the data.
473+
* \param gptr Global pointer being the source of the data transfer.
474+
* \param nelem The number of elements of \c dtype in buffer \c dest.
475+
* \param src_type The data type of the values at the source.
476+
* \param dst_type The data type of the values in buffer \c dest.
511477
* \param[out] handle Pointer to DART handle to instantiate for later use with \c dart_wait, \c dart_wait_all etc.
512478
*
479+
* \note Base-type conversion is not performed.
480+
*
513481
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
514482
*
515483
* \threadsafe
@@ -519,7 +487,8 @@ dart_ret_t dart_get_handle(
519487
void * dest,
520488
dart_gptr_t gptr,
521489
size_t nelem,
522-
dart_datatype_t dtype,
490+
dart_datatype_t src_type,
491+
dart_datatype_t dst_type,
523492
dart_handle_t * handle) DART_NOTHROW;
524493

525494
/**
@@ -528,12 +497,15 @@ dart_ret_t dart_get_handle(
528497
* dart_wait*() call or a fence/flush operation is needed to guarantee
529498
* completion.
530499
*
531-
* \param gptr Global pointer being the target of the data transfer.
532-
* \param src Local source memory to transfer data from.
533-
* \param nelem The number of elements of type \c dtype to transfer.
534-
* \param dtype The data type of the values in buffer \c dest.
500+
* \param gptr Global pointer being the target of the data transfer.
501+
* \param src Local source memory to transfer data from.
502+
* \param nelem The number of elements of type \c dtype to transfer.
503+
* \param src_type The data type of the values in buffer \c src.
504+
* \param dst_type The data type of the values at the target.
535505
* \param[out] handle Pointer to DART handle to instantiate for later use with \c dart_wait, \c dart_wait_all etc.
536506
*
507+
* \note Base-type conversion is not performed.
508+
*
537509
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
538510
*
539511
* \threadsafe
@@ -543,7 +515,8 @@ dart_ret_t dart_put_handle(
543515
dart_gptr_t gptr,
544516
const void * src,
545517
size_t nelem,
546-
dart_datatype_t dtype,
518+
dart_datatype_t src_type,
519+
dart_datatype_t dst_type,
547520
dart_handle_t * handle) DART_NOTHROW;
548521

549522
/**
@@ -657,10 +630,13 @@ dart_ret_t dart_testall_local(
657630
* 'BLOCKING' variant of dart_get.
658631
* Both local and remote completion is guaranteed.
659632
*
660-
* \param dest Local target memory to store the data.
661-
* \param gptr Global pointer being the source of the data transfer.
662-
* \param nelem The number of elements of type \c dtype to transfer.
663-
* \param dtype The data type of the values in buffer \c dest.
633+
* \param dest Local target memory to store the data.
634+
* \param gptr Global pointer being the source of the data transfer.
635+
* \param nelem The number of elements of type \c dtype to transfer.
636+
* \param src_type The data type of the values at the source.
637+
* \param dst_type The data type of the values in buffer \c dest.
638+
*
639+
* \note Base-type conversion is not performed.
664640
*
665641
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
666642
*
@@ -671,16 +647,20 @@ dart_ret_t dart_get_blocking(
671647
void * dest,
672648
dart_gptr_t gptr,
673649
size_t nelem,
674-
dart_datatype_t dtype) DART_NOTHROW;
650+
dart_datatype_t src_type,
651+
dart_datatype_t dst_type) DART_NOTHROW;
675652

676653
/**
677654
* 'BLOCKING' variant of dart_put.
678655
* Both local and remote completion is guaranteed.
679656
*
680-
* \param gptr Global pointer being the target of the data transfer.
681-
* \param src Local source memory to transfer data from.
682-
* \param nelem The number of elements of type \c dtype to transfer.
683-
* \param dtype The data type of the values in buffer \c dest.
657+
* \param gptr Global pointer being the target of the data transfer.
658+
* \param src Local source memory to transfer data from.
659+
* \param nelem The number of elements of type \c dtype to transfer.
660+
* \param src_type The data type of the values in buffer \c src.
661+
* \param dst_type The data type of the values at the target.
662+
*
663+
* \note Base-type conversion is not performed.
684664
*
685665
* \return \c DART_OK on success, any other of \ref dart_ret_t otherwise.
686666
*
@@ -691,7 +671,8 @@ dart_ret_t dart_put_blocking(
691671
dart_gptr_t gptr,
692672
const void * src,
693673
size_t nelem,
694-
dart_datatype_t dtype) DART_NOTHROW;
674+
dart_datatype_t src_type,
675+
dart_datatype_t dst_type) DART_NOTHROW;
695676

696677
/** \} */
697678

dart-if/include/dash/dart/if/dart_globmem.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ dart_ret_t dart_memfree(dart_gptr_t gptr) DART_NOTHROW;
318318
*/
319319
dart_ret_t dart_team_memalloc_aligned(
320320
dart_team_t teamid,
321-
size_t nelem,
321+
size_t nelem,
322322
dart_datatype_t dtype,
323323
dart_gptr_t * gptr) DART_NOTHROW;
324324

@@ -362,10 +362,10 @@ dart_ret_t dart_team_memfree(
362362
*/
363363
dart_ret_t dart_team_memregister_aligned(
364364
dart_team_t teamid,
365-
size_t nelem,
365+
size_t nelem,
366366
dart_datatype_t dtype,
367-
void * addr,
368-
dart_gptr_t * gptr) DART_NOTHROW;
367+
void * addr,
368+
dart_gptr_t * gptr) DART_NOTHROW;
369369

370370
/**
371371
* Collective function, attaches external memory previously allocated by
@@ -386,10 +386,10 @@ dart_ret_t dart_team_memregister_aligned(
386386
*/
387387
dart_ret_t dart_team_memregister(
388388
dart_team_t teamid,
389-
size_t nlelem,
389+
size_t nlelem,
390390
dart_datatype_t dtype,
391-
void * addr,
392-
dart_gptr_t * gptr) DART_NOTHROW;
391+
void * addr,
392+
dart_gptr_t * gptr) DART_NOTHROW;
393393

394394
/**
395395
* Collective function similar to dart_team_memfree() but on previously

0 commit comments

Comments
 (0)