root/opal/datatype/opal_datatype_cuda.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2011-2014 NVIDIA Corporation.  All rights reserved.
   3  * $COPYRIGHT$
   4  *
   5  * Additional copyrights may follow
   6  *
   7  * $HEADER$
   8  */
   9 
  10 #ifndef _OPAL_DATATYPE_CUDA_H
  11 #define _OPAL_DATATYPE_CUDA_H
  12 
  13 /* Structure to hold CUDA support functions that gets filled in when the
  14  * common cuda code is initialized.  This removes any dependency on <cuda.h>
  15  * in the opal cuda datatype code. */
  16 struct opal_common_cuda_function_table {
  17     int (*gpu_is_gpu_buffer)(const void*, opal_convertor_t*);
  18     int (*gpu_cu_memcpy_async)(void*, const void*, size_t, opal_convertor_t*);
  19     int (*gpu_cu_memcpy)(void*, const void*, size_t);
  20     int (*gpu_memmove)(void*, void*, size_t);
  21 };
  22 typedef struct opal_common_cuda_function_table opal_common_cuda_function_table_t;
  23 
  24 void mca_cuda_convertor_init(opal_convertor_t* convertor, const void *pUserBuf);
  25 bool opal_cuda_check_bufs(char *dest, char *src);
  26 bool opal_cuda_check_one_buf(char *buf, opal_convertor_t *convertor );
  27 void* opal_cuda_memcpy(void * dest, const void * src, size_t size, opal_convertor_t* convertor);
  28 void* opal_cuda_memcpy_sync(void * dest, const void * src, size_t size);
  29 void* opal_cuda_memmove(void * dest, void * src, size_t size);
  30 void opal_cuda_add_initialization_function(int (*fptr)(opal_common_cuda_function_table_t *));
  31 void opal_cuda_set_copy_function_async(opal_convertor_t* convertor, void *stream);
  32 
  33 #endif

/* [<][>][^][v][top][bottom][index][help] */