コード例 #1
0
int gpucomm_broadcast(gpudata* array, size_t offset, size_t count, int typecode,
                      int root, gpucomm* comm) {
  gpucontext* ctx = gpucomm_context(comm);
  if (ctx->comm_ops == NULL)
    return error_set(ctx->err, GA_DEVSUP_ERROR, "Collectives unavailable");
  return ctx->comm_ops->broadcast(array, offset, count, typecode, root, comm);
}
コード例 #2
0
void gpucomm_free(gpucomm* comm) {
  gpucontext* ctx;
  if (comm == NULL) return;
  ctx = gpucomm_context(comm);
  if (ctx->comm_ops != NULL)
    ctx->comm_ops->comm_free(comm);
}
コード例 #3
0
int gpucomm_broadcast(gpudata* array, size_t offset, size_t count, int typecode,
                      int root, gpucomm* comm) {
  gpucontext* ctx = gpucomm_context(comm);
  if (ctx->comm_ops == NULL)
    return GA_COMM_ERROR;
  return ctx->comm_ops->broadcast(array, offset, count, typecode, root, comm);
}
コード例 #4
0
int gpucomm_all_gather(gpudata* src, size_t offsrc, gpudata* dest,
                       size_t offdest, size_t count, int typecode,
                       gpucomm* comm) {
  gpucontext* ctx = gpucomm_context(comm);
  if (ctx->comm_ops == NULL)
    return error_set(ctx->err, GA_DEVSUP_ERROR, "Collectives unavailable");
  return ctx->comm_ops->all_gather(src, offsrc, dest, offdest, count, typecode,
                                   comm);
}
コード例 #5
0
int gpucomm_all_gather(gpudata* src, size_t offsrc, gpudata* dest,
                       size_t offdest, size_t count, int typecode,
                       gpucomm* comm) {
  gpucontext* ctx = gpucomm_context(comm);
  if (ctx->comm_ops == NULL)
    return GA_COMM_ERROR;
  return ctx->comm_ops->all_gather(src, offsrc, dest, offdest, count, typecode,
                                   comm);
}
コード例 #6
0
int gpucomm_reduce(gpudata* src, size_t offsrc, gpudata* dest, size_t offdest,
                   size_t count, int typecode, int opcode, int root,
                   gpucomm* comm) {
  gpucontext* ctx = gpucomm_context(comm);
  if (ctx->comm_ops == NULL)
    return GA_COMM_ERROR;
  return ctx->comm_ops->reduce(src, offsrc, dest, offdest, count, typecode,
                               opcode, root, comm);
}
コード例 #7
0
int gpucomm_get_rank(gpucomm* comm, int* rank) {
  gpucontext* ctx = gpucomm_context(comm);
  if (ctx->comm_ops == NULL)
    return error_set(ctx->err, GA_DEVSUP_ERROR, "Collectives unavailable");
  return ctx->comm_ops->get_rank(comm, rank);
}
コード例 #8
0
int gpucomm_get_rank(gpucomm* comm, int* rank) {
  gpucontext* ctx = gpucomm_context(comm);
  if (ctx->comm_ops == NULL)
    return GA_COMM_ERROR;
  return ctx->comm_ops->get_rank(comm, rank);
}
コード例 #9
0
int gpucomm_get_count(gpucomm* comm, int* gpucount) {
  gpucontext* ctx = gpucomm_context(comm);
  if (ctx->comm_ops == NULL)
    return GA_COMM_ERROR;
  return ctx->comm_ops->get_count(comm, gpucount);
}