root/oshmem/shmem/c/shmem_info.c

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

DEFINITIONS

This source file includes following definitions.
  1. shmem_info_get_version
  2. shmem_info_get_name

   1 /*
   2  * Copyright (c) 2015      Mellanox Technologies, Inc.
   3  *                         All rights reserved.
   4  * $COPYRIGHT$
   5  *
   6  * Additional copyrights may follow
   7  *
   8  * $HEADER$
   9  */
  10 #include "oshmem_config.h"
  11 
  12 #include <string.h>
  13 #include <assert.h>
  14 
  15 #include "oshmem/constants.h"
  16 #include "oshmem/include/shmem.h"
  17 
  18 void shmem_info_get_version(int *major, int *minor)
  19 {
  20     if (major) {
  21         *major = SHMEM_MAJOR_VERSION;
  22     }
  23 
  24     if (minor) {
  25         *minor = SHMEM_MINOR_VERSION;
  26     }
  27 }
  28 
  29 void shmem_info_get_name(char *name)
  30 {
  31     if (name) {
  32         assert(sizeof(SHMEM_VENDOR_STRING) < SHMEM_MAX_NAME_LEN);
  33         memset(name, 0, SHMEM_MAX_NAME_LEN);
  34         memcpy(name, SHMEM_VENDOR_STRING, sizeof(SHMEM_VENDOR_STRING));
  35     }
  36 }

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