// Generated file. DO NOT EDIT.
//
// This file is automatically generated by the rccl_gen.py script.
// If changes are required, run the script and commit the updated file.

#ifndef _HIP_PROF_RCCL_STR_H
#define _HIP_PROF_RCCL_STR_H
#define HIP_PROF_RCCL_VER 1

// RCCL API callbacks ID enumeration
enum rccl_api_id_t {
  RCCL_API_ID_NONE = 0,
  RCCL_API_ID_FIRST = 1,
  RCCL_API_ID_mscclLoadAlgo = 1,
  RCCL_API_ID_mscclRunAlgo = 2,
  RCCL_API_ID_mscclUnloadAlgo = 3,
  RCCL_API_ID_ncclAllGather = 4,
  RCCL_API_ID_ncclAllReduce = 5,
  RCCL_API_ID_ncclAllToAll = 6,
  RCCL_API_ID_ncclAllToAllv = 7,
  RCCL_API_ID_ncclBcast = 8,
  RCCL_API_ID_ncclBroadcast = 9,
  RCCL_API_ID_ncclGather = 10,
  RCCL_API_ID_ncclRecv = 11,
  RCCL_API_ID_ncclReduce = 12,
  RCCL_API_ID_ncclReduceScatter = 13,
  RCCL_API_ID_ncclScatter = 14,
  RCCL_API_ID_ncclSend = 15,
  RCCL_API_ID_LAST = 15,

};

// Return the RCCL API string for a given callback ID
static inline const char* rccl_api_name(const uint32_t id) {
  switch(id) {
    case RCCL_API_ID_mscclLoadAlgo: return "mscclLoadAlgo";
    case RCCL_API_ID_mscclRunAlgo: return "mscclRunAlgo";
    case RCCL_API_ID_mscclUnloadAlgo: return "mscclUnloadAlgo";
    case RCCL_API_ID_ncclAllGather: return "ncclAllGather";
    case RCCL_API_ID_ncclAllReduce: return "ncclAllReduce";
    case RCCL_API_ID_ncclAllToAll: return "ncclAllToAll";
    case RCCL_API_ID_ncclAllToAllv: return "ncclAllToAllv";
    case RCCL_API_ID_ncclBcast: return "ncclBcast";
    case RCCL_API_ID_ncclBroadcast: return "ncclBroadcast";
    case RCCL_API_ID_ncclGather: return "ncclGather";
    case RCCL_API_ID_ncclRecv: return "ncclRecv";
    case RCCL_API_ID_ncclReduce: return "ncclReduce";
    case RCCL_API_ID_ncclReduceScatter: return "ncclReduceScatter";
    case RCCL_API_ID_ncclScatter: return "ncclScatter";
    case RCCL_API_ID_ncclSend: return "ncclSend";
  };
  return "unknown";
}

#include <string.h>
// Return the RCCL API callback ID for a given name
static inline uint32_t rcclApiIdByName(const char* name) {
  if (strcmp("mscclLoadAlgo", name) == 0) return RCCL_API_ID_mscclLoadAlgo;
  if (strcmp("mscclRunAlgo", name) == 0) return RCCL_API_ID_mscclRunAlgo;
  if (strcmp("mscclUnloadAlgo", name) == 0) return RCCL_API_ID_mscclUnloadAlgo;
  if (strcmp("ncclAllGather", name) == 0) return RCCL_API_ID_ncclAllGather;
  if (strcmp("ncclAllReduce", name) == 0) return RCCL_API_ID_ncclAllReduce;
  if (strcmp("ncclAllToAll", name) == 0) return RCCL_API_ID_ncclAllToAll;
  if (strcmp("ncclAllToAllv", name) == 0) return RCCL_API_ID_ncclAllToAllv;
  if (strcmp("ncclBcast", name) == 0) return RCCL_API_ID_ncclBcast;
  if (strcmp("ncclBroadcast", name) == 0) return RCCL_API_ID_ncclBroadcast;
  if (strcmp("ncclGather", name) == 0) return RCCL_API_ID_ncclGather;
  if (strcmp("ncclRecv", name) == 0) return RCCL_API_ID_ncclRecv;
  if (strcmp("ncclReduce", name) == 0) return RCCL_API_ID_ncclReduce;
  if (strcmp("ncclReduceScatter", name) == 0) return RCCL_API_ID_ncclReduceScatter;
  if (strcmp("ncclScatter", name) == 0) return RCCL_API_ID_ncclScatter;
  if (strcmp("ncclSend", name) == 0) return RCCL_API_ID_ncclSend;
  return RCCL_API_ID_NONE;
}
#endif  // _HIP_PROF_RCCL_STR_H
