/**
 * Copyright 2022-2025 NVIDIA Corporation.  All rights reserved.
 *
 * Please refer to the NVIDIA end user license agreement (EULA) associated
 * with this source code for terms and conditions that govern your use of
 * this software. Any use, reproduction, disclosure, or distribution of
 * this software and related documentation outside the terms of the EULA
 * is strictly prohibited.
 *
 * This file is generated
 */

////////////////////////////////////////////////////////////////////////////////

#ifndef HELPER_CUPTI_ACTIVITY_ENUMS_H_
#define HELPER_CUPTI_ACTIVITY_ENUMS_H_

#pragma once

// Auto-generated header
#include <iostream>
#include <iomanip>
#include <cstdint>

// CUPTI headers
#include <cupti_activity.h>


static const char*
GetApiCallbackSiteString(
    CUpti_ApiCallbackSite e)
{
    switch(e)
    {
        case CUPTI_API_ENTER: return "ENTER";
        case CUPTI_API_EXIT: return "EXIT";
        case CUPTI_API_CBSITE_FORCE_INT: return "CBSITE_FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetCallbackDomainString(
    CUpti_CallbackDomain e)
{
    switch(e)
    {
        case CUPTI_CB_DOMAIN_INVALID: return "INVALID";
        case CUPTI_CB_DOMAIN_DRIVER_API: return "DRIVER_API";
        case CUPTI_CB_DOMAIN_RUNTIME_API: return "RUNTIME_API";
        case CUPTI_CB_DOMAIN_RESOURCE: return "RESOURCE";
        case CUPTI_CB_DOMAIN_SYNCHRONIZE: return "SYNCHRONIZE";
        case CUPTI_CB_DOMAIN_NVTX: return "NVTX";
        case CUPTI_CB_DOMAIN_STATE: return "STATE";
        case CUPTI_CB_DOMAIN_SIZE: return "SIZE";
        case CUPTI_CB_DOMAIN_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetCallbackIdResourceString(
    CUpti_CallbackIdResource e)
{
    switch(e)
    {
        case CUPTI_CBID_RESOURCE_INVALID: return "INVALID";
        case CUPTI_CBID_RESOURCE_CONTEXT_CREATED: return "CONTEXT_CREATED";
        case CUPTI_CBID_RESOURCE_CONTEXT_DESTROY_STARTING: return "CONTEXT_DESTROY_STARTING";
        case CUPTI_CBID_RESOURCE_STREAM_CREATED: return "STREAM_CREATED";
        case CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING: return "STREAM_DESTROY_STARTING";
        case CUPTI_CBID_RESOURCE_CU_INIT_FINISHED: return "CU_INIT_FINISHED";
        case CUPTI_CBID_RESOURCE_MODULE_LOADED: return "MODULE_LOADED";
        case CUPTI_CBID_RESOURCE_MODULE_UNLOAD_STARTING: return "MODULE_UNLOAD_STARTING";
        case CUPTI_CBID_RESOURCE_MODULE_PROFILED: return "MODULE_PROFILED";
        case CUPTI_CBID_RESOURCE_GRAPH_CREATED: return "GRAPH_CREATED";
        case CUPTI_CBID_RESOURCE_GRAPH_DESTROY_STARTING: return "GRAPH_DESTROY_STARTING";
        case CUPTI_CBID_RESOURCE_GRAPH_CLONED: return "GRAPH_CLONED";
        case CUPTI_CBID_RESOURCE_GRAPHNODE_CREATE_STARTING: return "GRAPHNODE_CREATE_STARTING";
        case CUPTI_CBID_RESOURCE_GRAPHNODE_CREATED: return "GRAPHNODE_CREATED";
        case CUPTI_CBID_RESOURCE_GRAPHNODE_DESTROY_STARTING: return "GRAPHNODE_DESTROY_STARTING";
        case CUPTI_CBID_RESOURCE_GRAPHNODE_DEPENDENCY_CREATED: return "GRAPHNODE_DEPENDENCY_CREATED";
        case CUPTI_CBID_RESOURCE_GRAPHNODE_DEPENDENCY_DESTROY_STARTING: return "GRAPHNODE_DEPENDENCY_DESTROY_STARTING";
        case CUPTI_CBID_RESOURCE_GRAPHEXEC_CREATE_STARTING: return "GRAPHEXEC_CREATE_STARTING";
        case CUPTI_CBID_RESOURCE_GRAPHEXEC_CREATED: return "GRAPHEXEC_CREATED";
        case CUPTI_CBID_RESOURCE_GRAPHEXEC_DESTROY_STARTING: return "GRAPHEXEC_DESTROY_STARTING";
        case CUPTI_CBID_RESOURCE_GRAPHNODE_CLONED: return "GRAPHNODE_CLONED";
        case CUPTI_CBID_RESOURCE_STREAM_ATTRIBUTE_CHANGED: return "STREAM_ATTRIBUTE_CHANGED";
        case CUPTI_CBID_RESOURCE_GRAPH_NODE_UPDATED: return "GRAPH_NODE_UPDATED";
        case CUPTI_CBID_RESOURCE_GRAPH_NODE_SET_PARAMS: return "GRAPH_NODE_SET_PARAMS";
        case CUPTI_CBID_RESOURCE_SIZE: return "SIZE";
        case CUPTI_CBID_RESOURCE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetCallbackIdSyncString(
    CUpti_CallbackIdSync e)
{
    switch(e)
    {
        case CUPTI_CBID_SYNCHRONIZE_INVALID: return "INVALID";
        case CUPTI_CBID_SYNCHRONIZE_STREAM_SYNCHRONIZED: return "STREAM_SYNCHRONIZED";
        case CUPTI_CBID_SYNCHRONIZE_CONTEXT_SYNCHRONIZED: return "CONTEXT_SYNCHRONIZED";
        case CUPTI_CBID_SYNCHRONIZE_SIZE: return "SIZE";
        case CUPTI_CBID_SYNCHRONIZE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetCallbackIdStateString(
    CUpti_CallbackIdState e)
{
    switch(e)
    {
        case CUPTI_CBID_STATE_INVALID: return "INVALID";
        case CUPTI_CBID_STATE_FATAL_ERROR: return "FATAL_ERROR";
        case CUPTI_CBID_STATE_ERROR: return "ERROR";
        case CUPTI_CBID_STATE_WARNING: return "WARNING";
        case CUPTI_CBID_STATE_SIZE: return "SIZE";
        case CUPTI_CBID_STATE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityKindString(
    CUpti_ActivityKind e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_KIND_INVALID: return "INVALID";
        case CUPTI_ACTIVITY_KIND_MEMCPY: return "MEMCPY";
        case CUPTI_ACTIVITY_KIND_MEMSET: return "MEMSET";
        case CUPTI_ACTIVITY_KIND_KERNEL: return "KERNEL";
        case CUPTI_ACTIVITY_KIND_DRIVER: return "DRIVER";
        case CUPTI_ACTIVITY_KIND_RUNTIME: return "RUNTIME";
        case CUPTI_ACTIVITY_KIND_EVENT: return "EVENT";
        case CUPTI_ACTIVITY_KIND_METRIC: return "METRIC";
        case CUPTI_ACTIVITY_KIND_DEVICE: return "DEVICE";
        case CUPTI_ACTIVITY_KIND_CONTEXT: return "CONTEXT";
        case CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL: return "CONCURRENT_KERNEL";
        case CUPTI_ACTIVITY_KIND_NAME: return "NAME";
        case CUPTI_ACTIVITY_KIND_MARKER: return "MARKER";
        case CUPTI_ACTIVITY_KIND_MARKER_DATA: return "MARKER_DATA";
        case CUPTI_ACTIVITY_KIND_SOURCE_LOCATOR: return "SOURCE_LOCATOR";
        case CUPTI_ACTIVITY_KIND_GLOBAL_ACCESS: return "GLOBAL_ACCESS";
        case CUPTI_ACTIVITY_KIND_BRANCH: return "BRANCH";
        case CUPTI_ACTIVITY_KIND_OVERHEAD: return "OVERHEAD";
        case CUPTI_ACTIVITY_KIND_CDP_KERNEL: return "CDP_KERNEL";
        case CUPTI_ACTIVITY_KIND_PREEMPTION: return "PREEMPTION";
        case CUPTI_ACTIVITY_KIND_ENVIRONMENT: return "ENVIRONMENT";
        case CUPTI_ACTIVITY_KIND_EVENT_INSTANCE: return "EVENT_INSTANCE";
        case CUPTI_ACTIVITY_KIND_MEMCPY2: return "MEMCPY2";
        case CUPTI_ACTIVITY_KIND_METRIC_INSTANCE: return "METRIC_INSTANCE";
        case CUPTI_ACTIVITY_KIND_INSTRUCTION_EXECUTION: return "INSTRUCTION_EXECUTION";
        case CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER: return "UNIFIED_MEMORY_COUNTER";
        case CUPTI_ACTIVITY_KIND_FUNCTION: return "FUNCTION";
        case CUPTI_ACTIVITY_KIND_MODULE: return "MODULE";
        case CUPTI_ACTIVITY_KIND_DEVICE_ATTRIBUTE: return "DEVICE_ATTRIBUTE";
        case CUPTI_ACTIVITY_KIND_SHARED_ACCESS: return "SHARED_ACCESS";
        case CUPTI_ACTIVITY_KIND_PC_SAMPLING: return "PC_SAMPLING";
        case CUPTI_ACTIVITY_KIND_PC_SAMPLING_RECORD_INFO: return "PC_SAMPLING_RECORD_INFO";
        case CUPTI_ACTIVITY_KIND_INSTRUCTION_CORRELATION: return "INSTRUCTION_CORRELATION";
        case CUPTI_ACTIVITY_KIND_OPENACC_DATA: return "OPENACC_DATA";
        case CUPTI_ACTIVITY_KIND_OPENACC_LAUNCH: return "OPENACC_LAUNCH";
        case CUPTI_ACTIVITY_KIND_OPENACC_OTHER: return "OPENACC_OTHER";
        case CUPTI_ACTIVITY_KIND_CUDA_EVENT: return "CUDA_EVENT";
        case CUPTI_ACTIVITY_KIND_STREAM: return "STREAM";
        case CUPTI_ACTIVITY_KIND_SYNCHRONIZATION: return "SYNCHRONIZATION";
        case CUPTI_ACTIVITY_KIND_EXTERNAL_CORRELATION: return "EXTERNAL_CORRELATION";
        case CUPTI_ACTIVITY_KIND_NVLINK: return "NVLINK";
        case CUPTI_ACTIVITY_KIND_INSTANTANEOUS_EVENT: return "INSTANTANEOUS_EVENT";
        case CUPTI_ACTIVITY_KIND_INSTANTANEOUS_EVENT_INSTANCE: return "INSTANTANEOUS_EVENT_INSTANCE";
        case CUPTI_ACTIVITY_KIND_INSTANTANEOUS_METRIC: return "INSTANTANEOUS_METRIC";
        case CUPTI_ACTIVITY_KIND_INSTANTANEOUS_METRIC_INSTANCE: return "INSTANTANEOUS_METRIC_INSTANCE";
        case CUPTI_ACTIVITY_KIND_MEMORY: return "MEMORY";
        case CUPTI_ACTIVITY_KIND_PCIE: return "PCIE";
        case CUPTI_ACTIVITY_KIND_OPENMP: return "OPENMP";
        case CUPTI_ACTIVITY_KIND_INTERNAL_LAUNCH_API: return "INTERNAL_LAUNCH_API";
        case CUPTI_ACTIVITY_KIND_MEMORY2: return "MEMORY2";
        case CUPTI_ACTIVITY_KIND_MEMORY_POOL: return "MEMORY_POOL";
        case CUPTI_ACTIVITY_KIND_GRAPH_TRACE: return "GRAPH_TRACE";
        case CUPTI_ACTIVITY_KIND_JIT: return "JIT";
        case CUPTI_ACTIVITY_KIND_DEVICE_GRAPH_TRACE: return "DEVICE_GRAPH_TRACE";
        case CUPTI_ACTIVITY_KIND_MEM_DECOMPRESS: return "MEM_DECOMPRESS";
        case CUPTI_ACTIVITY_KIND_CONFIDENTIAL_COMPUTE_ROTATION: return "CONFIDENTIAL_COMPUTE_ROTATION";
        case CUPTI_ACTIVITY_KIND_GRAPH_HOST_NODE: return "GRAPH_HOST_NODE";
        case CUPTI_ACTIVITY_KIND_COMPUTE_ENGINE_CTX_SWITCH: return "COMPUTE_ENGINE_CTX_SWITCH";
        case CUPTI_ACTIVITY_KIND_HOST_LAUNCH: return "HOST_LAUNCH";
        case CUPTI_ACTIVITY_KIND_GREEN_CONTEXT: return "GREEN_CONTEXT";
        case CUPTI_ACTIVITY_KIND_COUNT: return "COUNT";
        case CUPTI_ACTIVITY_KIND_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityObjectKindString(
    CUpti_ActivityObjectKind e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_OBJECT_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_OBJECT_PROCESS: return "PROCESS";
        case CUPTI_ACTIVITY_OBJECT_THREAD: return "THREAD";
        case CUPTI_ACTIVITY_OBJECT_DEVICE: return "DEVICE";
        case CUPTI_ACTIVITY_OBJECT_CONTEXT: return "CONTEXT";
        case CUPTI_ACTIVITY_OBJECT_STREAM: return "STREAM";
        case CUPTI_ACTIVITY_OBJECT_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityOverheadKindString(
    CUpti_ActivityOverheadKind e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_OVERHEAD_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_OVERHEAD_DRIVER_COMPILER: return "DRIVER_COMPILER";
        case CUPTI_ACTIVITY_OVERHEAD_CUPTI_BUFFER_FLUSH: return "CUPTI_BUFFER_FLUSH";
        case CUPTI_ACTIVITY_OVERHEAD_CUPTI_INSTRUMENTATION: return "CUPTI_INSTRUMENTATION";
        case CUPTI_ACTIVITY_OVERHEAD_CUPTI_RESOURCE: return "CUPTI_RESOURCE";
        case CUPTI_ACTIVITY_OVERHEAD_RUNTIME_TRIGGERED_MODULE_LOADING: return "RUNTIME_TRIGGERED_MODULE_LOADING";
        case CUPTI_ACTIVITY_OVERHEAD_LAZY_FUNCTION_LOADING: return "LAZY_FUNCTION_LOADING";
        case CUPTI_ACTIVITY_OVERHEAD_COMMAND_BUFFER_FULL: return "COMMAND_BUFFER_FULL";
        case CUPTI_ACTIVITY_OVERHEAD_ACTIVITY_BUFFER_REQUEST: return "ACTIVITY_BUFFER_REQUEST";
        case CUPTI_ACTIVITY_OVERHEAD_UVM_ACTIVITY_INIT: return "UVM_ACTIVITY_INIT";
        case CUPTI_ACTIVITY_OVERHEAD_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityComputeApiKindString(
    CUpti_ActivityComputeApiKind e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_COMPUTE_API_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_COMPUTE_API_CUDA: return "CUDA";
        case CUPTI_ACTIVITY_COMPUTE_API_CUDA_MPS: return "CUDA_MPS";
        case CUPTI_ACTIVITY_COMPUTE_API_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityPCSamplingStallReasonString(
    CUpti_ActivityPCSamplingStallReason e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_INVALID: return "INVALID";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_NONE: return "NONE";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_INST_FETCH: return "INST_FETCH";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_EXEC_DEPENDENCY: return "EXEC_DEPENDENCY";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_MEMORY_DEPENDENCY: return "MEMORY_DEPENDENCY";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_TEXTURE: return "TEXTURE";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_SYNC: return "SYNC";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_CONSTANT_MEMORY_DEPENDENCY: return "CONSTANT_MEMORY_DEPENDENCY";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_PIPE_BUSY: return "PIPE_BUSY";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_MEMORY_THROTTLE: return "MEMORY_THROTTLE";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_NOT_SELECTED: return "NOT_SELECTED";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_OTHER: return "OTHER";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_SLEEPING: return "SLEEPING";
        case CUPTI_ACTIVITY_PC_SAMPLING_STALL_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityPCSamplingPeriodString(
    CUpti_ActivityPCSamplingPeriod e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_INVALID: return "INVALID";
        case CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_MIN: return "MIN";
        case CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_LOW: return "LOW";
        case CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_MID: return "MID";
        case CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_HIGH: return "HIGH";
        case CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_MAX: return "MAX";
        case CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemcpyKindString(
    CUpti_ActivityMemcpyKind e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_MEMCPY_KIND_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_MEMCPY_KIND_HTOD: return "HTOD";
        case CUPTI_ACTIVITY_MEMCPY_KIND_DTOH: return "DTOH";
        case CUPTI_ACTIVITY_MEMCPY_KIND_HTOA: return "HTOA";
        case CUPTI_ACTIVITY_MEMCPY_KIND_ATOH: return "ATOH";
        case CUPTI_ACTIVITY_MEMCPY_KIND_ATOA: return "ATOA";
        case CUPTI_ACTIVITY_MEMCPY_KIND_ATOD: return "ATOD";
        case CUPTI_ACTIVITY_MEMCPY_KIND_DTOA: return "DTOA";
        case CUPTI_ACTIVITY_MEMCPY_KIND_DTOD: return "DTOD";
        case CUPTI_ACTIVITY_MEMCPY_KIND_HTOH: return "HTOH";
        case CUPTI_ACTIVITY_MEMCPY_KIND_PTOP: return "PTOP";
        case CUPTI_ACTIVITY_MEMCPY_KIND_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemoryKindString(
    CUpti_ActivityMemoryKind e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_MEMORY_KIND_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_MEMORY_KIND_PAGEABLE: return "PAGEABLE";
        case CUPTI_ACTIVITY_MEMORY_KIND_PINNED: return "PINNED";
        case CUPTI_ACTIVITY_MEMORY_KIND_DEVICE: return "DEVICE";
        case CUPTI_ACTIVITY_MEMORY_KIND_ARRAY: return "ARRAY";
        case CUPTI_ACTIVITY_MEMORY_KIND_MANAGED: return "MANAGED";
        case CUPTI_ACTIVITY_MEMORY_KIND_DEVICE_STATIC: return "DEVICE_STATIC";
        case CUPTI_ACTIVITY_MEMORY_KIND_MANAGED_STATIC: return "MANAGED_STATIC";
        case CUPTI_ACTIVITY_MEMORY_KIND_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityPreemptionKindString(
    CUpti_ActivityPreemptionKind e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_PREEMPTION_KIND_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_PREEMPTION_KIND_SAVE: return "SAVE";
        case CUPTI_ACTIVITY_PREEMPTION_KIND_RESTORE: return "RESTORE";
        case CUPTI_ACTIVITY_PREEMPTION_KIND_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityEnvironmentKindString(
    CUpti_ActivityEnvironmentKind e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_ENVIRONMENT_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_ENVIRONMENT_SPEED: return "SPEED";
        case CUPTI_ACTIVITY_ENVIRONMENT_TEMPERATURE: return "TEMPERATURE";
        case CUPTI_ACTIVITY_ENVIRONMENT_POWER: return "POWER";
        case CUPTI_ACTIVITY_ENVIRONMENT_COOLING: return "COOLING";
        case CUPTI_ACTIVITY_ENVIRONMENT_COUNT: return "COUNT";
        case CUPTI_ACTIVITY_ENVIRONMENT_KIND_FORCE_INT: return "KIND_FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetEnvironmentClocksThrottleReasonString(
    CUpti_EnvironmentClocksThrottleReason e)
{
    switch(e)
    {
        case CUPTI_CLOCKS_THROTTLE_REASON_GPU_IDLE: return "GPU_IDLE";
        case CUPTI_CLOCKS_THROTTLE_REASON_USER_DEFINED_CLOCKS: return "USER_DEFINED_CLOCKS";
        case CUPTI_CLOCKS_THROTTLE_REASON_SW_POWER_CAP: return "SW_POWER_CAP";
        case CUPTI_CLOCKS_THROTTLE_REASON_HW_SLOWDOWN: return "HW_SLOWDOWN";
        case CUPTI_CLOCKS_THROTTLE_REASON_UNKNOWN: return "UNKNOWN";
        case CUPTI_CLOCKS_THROTTLE_REASON_UNSUPPORTED: return "UNSUPPORTED";
        case CUPTI_CLOCKS_THROTTLE_REASON_NONE: return "NONE";
        case CUPTI_CLOCKS_THROTTLE_REASON_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityUnifiedMemoryCounterScopeString(
    CUpti_ActivityUnifiedMemoryCounterScope e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_PROCESS_SINGLE_DEVICE: return "PROCESS_SINGLE_DEVICE";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_PROCESS_ALL_DEVICES: return "PROCESS_ALL_DEVICES";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_COUNT: return "COUNT";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityUnifiedMemoryCounterKindString(
    CUpti_ActivityUnifiedMemoryCounterKind e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD: return "BYTES_TRANSFER_HTOD";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH: return "BYTES_TRANSFER_DTOH";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT: return "CPU_PAGE_FAULT_COUNT";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT: return "GPU_PAGE_FAULT";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING: return "THRASHING";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING: return "THROTTLING";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP: return "REMOTE_MAP";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOD: return "BYTES_TRANSFER_DTOD";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_COUNT: return "COUNT";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityUnifiedMemoryAccessTypeString(
    CUpti_ActivityUnifiedMemoryAccessType e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_READ: return "READ";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_WRITE: return "WRITE";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_ATOMIC: return "ATOMIC";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_PREFETCH: return "PREFETCH";
        default: return "<unknown>";
    }
}

static const char*
GetActivityUnifiedMemoryMigrationCauseString(
    CUpti_ActivityUnifiedMemoryMigrationCause e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_USER: return "USER";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_COHERENCE: return "COHERENCE";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_PREFETCH: return "PREFETCH";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_EVICTION: return "EVICTION";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_ACCESS_COUNTERS: return "ACCESS_COUNTERS";
        default: return "<unknown>";
    }
}

static const char*
GetActivityUnifiedMemoryRemoteMapCauseString(
    CUpti_ActivityUnifiedMemoryRemoteMapCause e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_COHERENCE: return "COHERENCE";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_THRASHING: return "THRASHING";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_POLICY: return "POLICY";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_OUT_OF_MEMORY: return "OUT_OF_MEMORY";
        case CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_EVICTION: return "EVICTION";
        default: return "<unknown>";
    }
}

static const char*
GetActivityInstructionClassString(
    CUpti_ActivityInstructionClass e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_FP_32: return "FP_32";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_FP_64: return "FP_64";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_INTEGER: return "INTEGER";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_BIT_CONVERSION: return "BIT_CONVERSION";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_CONTROL_FLOW: return "CONTROL_FLOW";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_GLOBAL: return "GLOBAL";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_SHARED: return "SHARED";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_LOCAL: return "LOCAL";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_GENERIC: return "GENERIC";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_SURFACE: return "SURFACE";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_CONSTANT: return "CONSTANT";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_TEXTURE: return "TEXTURE";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_GLOBAL_ATOMIC: return "GLOBAL_ATOMIC";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_SHARED_ATOMIC: return "SHARED_ATOMIC";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_SURFACE_ATOMIC: return "SURFACE_ATOMIC";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_INTER_THREAD_COMMUNICATION: return "INTER_THREAD_COMMUNICATION";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_BARRIER: return "BARRIER";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_MISCELLANEOUS: return "MISCELLANEOUS";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_FP_16: return "FP_16";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_UNIFORM: return "UNIFORM";
        case CUPTI_ACTIVITY_INSTRUCTION_CLASS_KIND_FORCE_INT: return "KIND_FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityPartitionedGlobalCacheConfigString(
    CUpti_ActivityPartitionedGlobalCacheConfig e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_NOT_SUPPORTED: return "NOT_SUPPORTED";
        case CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_OFF: return "OFF";
        case CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_ON: return "ON";
        case CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivitySynchronizationTypeString(
    CUpti_ActivitySynchronizationType e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_UNKNOWN: return "UNKNOWN";
        case CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_EVENT_SYNCHRONIZE: return "EVENT_SYNCHRONIZE";
        case CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_STREAM_WAIT_EVENT: return "STREAM_WAIT_EVENT";
        case CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_STREAM_SYNCHRONIZE: return "STREAM_SYNCHRONIZE";
        case CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_CONTEXT_SYNCHRONIZE: return "CONTEXT_SYNCHRONIZE";
        case CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityStreamFlagString(
    CUpti_ActivityStreamFlag e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_STREAM_CREATE_FLAG_UNKNOWN: return "FLAG_UNKNOWN";
        case CUPTI_ACTIVITY_STREAM_CREATE_FLAG_DEFAULT: return "FLAG_DEFAULT";
        case CUPTI_ACTIVITY_STREAM_CREATE_FLAG_NON_BLOCKING: return "FLAG_NON_BLOCKING";
        case CUPTI_ACTIVITY_STREAM_CREATE_FLAG_NULL: return "FLAG_NULL";
        case CUPTI_ACTIVITY_STREAM_CREATE_MASK: return "MASK";
        case CUPTI_ACTIVITY_STREAM_CREATE_FLAG_FORCE_INT: return "FLAG_FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetLinkFlagString(
    CUpti_LinkFlag e)
{
    switch(e)
    {
        case CUPTI_LINK_FLAG_INVALID: return "INVALID";
        case CUPTI_LINK_FLAG_PEER_ACCESS: return "PEER_ACCESS";
        case CUPTI_LINK_FLAG_SYSMEM_ACCESS: return "SYSMEM_ACCESS";
        case CUPTI_LINK_FLAG_PEER_ATOMICS: return "PEER_ATOMICS";
        case CUPTI_LINK_FLAG_SYSMEM_ATOMICS: return "SYSMEM_ATOMICS";
        case CUPTI_LINK_FLAG_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemoryOperationTypeString(
    CUpti_ActivityMemoryOperationType e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_MEMORY_OPERATION_TYPE_INVALID: return "INVALID";
        case CUPTI_ACTIVITY_MEMORY_OPERATION_TYPE_ALLOCATION: return "ALLOCATION";
        case CUPTI_ACTIVITY_MEMORY_OPERATION_TYPE_RELEASE: return "RELEASE";
        case CUPTI_ACTIVITY_MEMORY_OPERATION_TYPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemoryPoolTypeString(
    CUpti_ActivityMemoryPoolType e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_MEMORY_POOL_TYPE_INVALID: return "INVALID";
        case CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL: return "LOCAL";
        case CUPTI_ACTIVITY_MEMORY_POOL_TYPE_IMPORTED: return "IMPORTED";
        case CUPTI_ACTIVITY_MEMORY_POOL_TYPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemoryPoolOperationTypeString(
    CUpti_ActivityMemoryPoolOperationType e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_INVALID: return "INVALID";
        case CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_CREATED: return "CREATED";
        case CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_DESTROYED: return "DESTROYED";
        case CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_TRIMMED: return "TRIMMED";
        case CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetChannelTypeString(
    CUpti_ChannelType e)
{
    switch(e)
    {
        case CUPTI_CHANNEL_TYPE_INVALID: return "INVALID";
        case CUPTI_CHANNEL_TYPE_COMPUTE: return "COMPUTE";
        case CUPTI_CHANNEL_TYPE_ASYNC_MEMCPY: return "ASYNC_MEMCPY";
        case CUPTI_CHANNEL_TYPE_DECOMP: return "DECOMP";
        case CUPTI_CHANNEL_TYPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetContextCigModeString(
    CUpti_ContextCigMode e)
{
    switch(e)
    {
        case CUPTI_CONTEXT_CIG_MODE_NONE: return "NONE";
        case CUPTI_CONTEXT_CIG_MODE_CIG: return "CIG";
        case CUPTI_CONTEXT_CIG_MODE_CIG_FALLBACK: return "CIG_FALLBACK";
        case CUPTI_CONTEXT_CIG_MODE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetNvtxExtPayloadTypeString(
    CUpti_NvtxExtPayloadType e)
{
    switch(e)
    {
        case CUPTI_NVTX_EXT_PAYLOAD_TYPE_UNKNOWN: return "UNKNOWN";
        case CUPTI_NVTX_EXT_PAYLOAD_TYPE_SCHEMA: return "SCHEMA";
        case CUPTI_NVTX_EXT_PAYLOAD_TYPE_ENUM: return "ENUM";
        case CUPTI_NVTX_EXT_PAYLOAD_TYPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemcpyFieldIdsString(
    CUpti_ActivityMemcpyFieldIds e)
{
    switch(e)
    {
        case MEMCPY_FIELD_KIND: return "KIND";
        case MEMCPY_FIELD_COPY_KIND: return "COPY_KIND";
        case MEMCPY_FIELD_SRC_KIND: return "SRC_KIND";
        case MEMCPY_FIELD_DST_KIND: return "DST_KIND";
        case MEMCPY_FIELD_FLAGS: return "FLAGS";
        case MEMCPY_FIELD_BYTES: return "BYTES";
        case MEMCPY_FIELD_START: return "START";
        case MEMCPY_FIELD_END: return "END";
        case MEMCPY_FIELD_DEVICE_ID: return "DEVICE_ID";
        case MEMCPY_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case MEMCPY_FIELD_STREAM_ID: return "STREAM_ID";
        case MEMCPY_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case MEMCPY_FIELD_GRAPH_NODE_ID: return "GRAPH_NODE_ID";
        case MEMCPY_FIELD_GRAPH_ID: return "GRAPH_ID";
        case MEMCPY_FIELD_CHANNEL_ID: return "CHANNEL_ID";
        case MEMCPY_FIELD_CHANNEL_TYPE: return "CHANNEL_TYPE";
        case MEMCPY_FIELD_IS_DEVICE_LAUNCHED: return "IS_DEVICE_LAUNCHED";
        case MEMCPY_FIELD_COPY_COUNT: return "COPY_COUNT";
        case MEMCPY_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemcpy2FieldIdsString(
    CUpti_ActivityMemcpy2FieldIds e)
{
    switch(e)
    {
        case MEMCPY2_FIELD_KIND: return "KIND";
        case MEMCPY2_FIELD_COPY_KIND: return "COPY_KIND";
        case MEMCPY2_FIELD_SRC_KIND: return "SRC_KIND";
        case MEMCPY2_FIELD_DST_KIND: return "DST_KIND";
        case MEMCPY2_FIELD_FLAGS: return "FLAGS";
        case MEMCPY2_FIELD_BYTES: return "BYTES";
        case MEMCPY2_FIELD_START: return "START";
        case MEMCPY2_FIELD_END: return "END";
        case MEMCPY2_FIELD_DEVICE_ID: return "DEVICE_ID";
        case MEMCPY2_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case MEMCPY2_FIELD_STREAM_ID: return "STREAM_ID";
        case MEMCPY2_FIELD_SRC_DEVICE_ID: return "SRC_DEVICE_ID";
        case MEMCPY2_FIELD_SRC_CONTEXT_ID: return "SRC_CONTEXT_ID";
        case MEMCPY2_FIELD_DST_DEVICE_ID: return "DST_DEVICE_ID";
        case MEMCPY2_FIELD_DST_CONTEXT_ID: return "DST_CONTEXT_ID";
        case MEMCPY2_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case MEMCPY2_FIELD_GRAPH_NODE_ID: return "GRAPH_NODE_ID";
        case MEMCPY2_FIELD_GRAPH_ID: return "GRAPH_ID";
        case MEMCPY2_FIELD_CHANNEL_ID: return "CHANNEL_ID";
        case MEMCPY2_FIELD_CHANNEL_TYPE: return "CHANNEL_TYPE";
        case MEMCPY2_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemsetFieldIdsString(
    CUpti_ActivityMemsetFieldIds e)
{
    switch(e)
    {
        case MEMSET_FIELD_KIND: return "KIND";
        case MEMSET_FIELD_VALUE: return "VALUE";
        case MEMSET_FIELD_BYTES: return "BYTES";
        case MEMSET_FIELD_START: return "START";
        case MEMSET_FIELD_END: return "END";
        case MEMSET_FIELD_DEVICE_ID: return "DEVICE_ID";
        case MEMSET_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case MEMSET_FIELD_STREAM_ID: return "STREAM_ID";
        case MEMSET_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case MEMSET_FIELD_FLAGS: return "FLAGS";
        case MEMSET_FIELD_MEMORY_KIND: return "MEMORY_KIND";
        case MEMSET_FIELD_GRAPH_NODE_ID: return "GRAPH_NODE_ID";
        case MEMSET_FIELD_GRAPH_ID: return "GRAPH_ID";
        case MEMSET_FIELD_CHANNEL_ID: return "CHANNEL_ID";
        case MEMSET_FIELD_CHANNEL_TYPE: return "CHANNEL_TYPE";
        case MEMSET_FIELD_IS_DEVICE_LAUNCHED: return "IS_DEVICE_LAUNCHED";
        case MEMSET_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemoryFieldIdsString(
    CUpti_ActivityMemoryFieldIds e)
{
    switch(e)
    {
        case MEMORY_FIELD_KIND: return "KIND";
        case MEMORY_FIELD_OPERATION_TYPE: return "OPERATION_TYPE";
        case MEMORY_FIELD_MEMORY_KIND: return "MEMORY_KIND";
        case MEMORY_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case MEMORY_FIELD_ADDRESS: return "ADDRESS";
        case MEMORY_FIELD_BYTES: return "BYTES";
        case MEMORY_FIELD_TIMESTAMP: return "TIMESTAMP";
        case MEMORY_FIELD_PROCESS_ID: return "PROCESS_ID";
        case MEMORY_FIELD_DEVICE_ID: return "DEVICE_ID";
        case MEMORY_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case MEMORY_FIELD_STREAM_ID: return "STREAM_ID";
        case MEMORY_FIELD_IS_ASYNC: return "IS_ASYNC";
        case MEMORY_FIELD_POOL_TYPE: return "POOL_TYPE";
        case MEMORY_FIELD_POOL_ADDRESS: return "POOL_ADDRESS";
        case MEMORY_FIELD_POOL_RELEASE_THRESHOLD: return "POOL_RELEASE_THRESHOLD";
        case MEMORY_FIELD_POOL_SIZE: return "POOL_SIZE";
        case MEMORY_FIELD_POOL_PROCESS_ID: return "POOL_PROCESS_ID";
        case MEMORY_FIELD_POOL_UTILIZED_SIZE: return "POOL_UTILIZED_SIZE";
        case MEMORY_FIELD_SOURCE: return "SOURCE";
        case MEMORY_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemoryPoolFieldIdsString(
    CUpti_ActivityMemoryPoolFieldIds e)
{
    switch(e)
    {
        case MEMORY_POOL_FIELD_KIND: return "KIND";
        case MEMORY_POOL_FIELD_OPERATION_TYPE: return "OPERATION_TYPE";
        case MEMORY_POOL_FIELD_POOL_TYPE: return "POOL_TYPE";
        case MEMORY_POOL_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case MEMORY_POOL_FIELD_PROCESS_ID: return "PROCESS_ID";
        case MEMORY_POOL_FIELD_DEVICE_ID: return "DEVICE_ID";
        case MEMORY_POOL_FIELD_MIN_BYTES_TO_KEEP: return "MIN_BYTES_TO_KEEP";
        case MEMORY_POOL_FIELD_ADDRESS: return "ADDRESS";
        case MEMORY_POOL_FIELD_SIZE: return "SIZE";
        case MEMORY_POOL_FIELD_RELEASE_THRESHOLD: return "RELEASE_THRESHOLD";
        case MEMORY_POOL_FIELD_TIMESTAMP: return "TIMESTAMP";
        case MEMORY_POOL_FIELD_UTILIZED_SIZE: return "UTILIZED_SIZE";
        case MEMORY_POOL_FIELD_IS_MANAGED_POOL: return "IS_MANAGED_POOL";
        case MEMORY_POOL_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityLaunchTypeString(
    CUpti_ActivityLaunchType e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_LAUNCH_TYPE_REGULAR: return "REGULAR";
        case CUPTI_ACTIVITY_LAUNCH_TYPE_COOPERATIVE_SINGLE_DEVICE: return "COOPERATIVE_SINGLE_DEVICE";
        case CUPTI_ACTIVITY_LAUNCH_TYPE_COOPERATIVE_MULTI_DEVICE: return "COOPERATIVE_MULTI_DEVICE";
        case CUPTI_ACTIVITY_LAUNCH_TYPE_CBL_COMMANDLIST: return "CBL_COMMANDLIST";
        default: return "<unknown>";
    }
}

static const char*
GetFuncShmemLimitConfigString(
    CUpti_FuncShmemLimitConfig e)
{
    switch(e)
    {
        case CUPTI_FUNC_SHMEM_LIMIT_DEFAULT: return "DEFAULT";
        case CUPTI_FUNC_SHMEM_LIMIT_OPTIN: return "OPTIN";
        case CUPTI_FUNC_SHMEM_LIMIT_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityKernelFieldIdsString(
    CUpti_ActivityKernelFieldIds e)
{
    switch(e)
    {
        case KERNEL_FIELD_KIND: return "KIND";
        case KERNEL_FIELD_CACHE_CONFIG_REQUESTED: return "CACHE_CONFIG_REQUESTED";
        case KERNEL_FIELD_CACHE_CONFIG_EXECUTED: return "CACHE_CONFIG_EXECUTED";
        case KERNEL_FIELD_SHARED_MEMORY_CONFIG: return "SHARED_MEMORY_CONFIG";
        case KERNEL_FIELD_REGISTERS_PER_THREAD: return "REGISTERS_PER_THREAD";
        case KERNEL_FIELD_PARTITIONED_GLOBAL_CACHE_REQUESTED: return "PARTITIONED_GLOBAL_CACHE_REQUESTED";
        case KERNEL_FIELD_PARTITIONED_GLOBAL_CACHE_EXECUTED: return "PARTITIONED_GLOBAL_CACHE_EXECUTED";
        case KERNEL_FIELD_START: return "START";
        case KERNEL_FIELD_END: return "END";
        case KERNEL_FIELD_COMPLETED: return "COMPLETED";
        case KERNEL_FIELD_DEVICE_ID: return "DEVICE_ID";
        case KERNEL_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case KERNEL_FIELD_STREAM_ID: return "STREAM_ID";
        case KERNEL_FIELD_GRID_X: return "GRID_X";
        case KERNEL_FIELD_GRID_Y: return "GRID_Y";
        case KERNEL_FIELD_GRID_Z: return "GRID_Z";
        case KERNEL_FIELD_BLOCK_X: return "BLOCK_X";
        case KERNEL_FIELD_BLOCK_Y: return "BLOCK_Y";
        case KERNEL_FIELD_BLOCK_Z: return "BLOCK_Z";
        case KERNEL_FIELD_STATIC_SHARED_MEMORY: return "STATIC_SHARED_MEMORY";
        case KERNEL_FIELD_DYNAMIC_SHARED_MEMORY: return "DYNAMIC_SHARED_MEMORY";
        case KERNEL_FIELD_LOCAL_MEMORY_PER_THREAD: return "LOCAL_MEMORY_PER_THREAD";
        case KERNEL_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case KERNEL_FIELD_GRID_ID: return "GRID_ID";
        case KERNEL_FIELD_NAME: return "NAME";
        case KERNEL_FIELD_QUEUED: return "QUEUED";
        case KERNEL_FIELD_SUBMITTED: return "SUBMITTED";
        case KERNEL_FIELD_LAUNCH_TYPE: return "LAUNCH_TYPE";
        case KERNEL_FIELD_IS_SHARED_MEMORY_CARVEOUT_REQUESTED: return "IS_SHARED_MEMORY_CARVEOUT_REQUESTED";
        case KERNEL_FIELD_SHARED_MEMORY_CARVEOUT_REQUESTED: return "SHARED_MEMORY_CARVEOUT_REQUESTED";
        case KERNEL_FIELD_SHARED_MEMORY_EXECUTED: return "SHARED_MEMORY_EXECUTED";
        case KERNEL_FIELD_GRAPH_NODE_ID: return "GRAPH_NODE_ID";
        case KERNEL_FIELD_SHMEM_LIMIT_CONFIG: return "SHMEM_LIMIT_CONFIG";
        case KERNEL_FIELD_GRAPH_ID: return "GRAPH_ID";
        case KERNEL_FIELD_ACCESS_POLICY_WINDOW: return "ACCESS_POLICY_WINDOW";
        case KERNEL_FIELD_CHANNEL_ID: return "CHANNEL_ID";
        case KERNEL_FIELD_CHANNEL_TYPE: return "CHANNEL_TYPE";
        case KERNEL_FIELD_CLUSTER_X: return "CLUSTER_X";
        case KERNEL_FIELD_CLUSTER_Y: return "CLUSTER_Y";
        case KERNEL_FIELD_CLUSTER_Z: return "CLUSTER_Z";
        case KERNEL_FIELD_CLUSTER_SCHEDULING_POLICY: return "CLUSTER_SCHEDULING_POLICY";
        case KERNEL_FIELD_LOCAL_MEMORY_TOTAL: return "LOCAL_MEMORY_TOTAL";
        case KERNEL_FIELD_MAX_POTENTIAL_CLUSTER_SIZE: return "MAX_POTENTIAL_CLUSTER_SIZE";
        case KERNEL_FIELD_MAX_ACTIVE_CLUSTERS: return "MAX_ACTIVE_CLUSTERS";
        case KERNEL_FIELD_IS_DEVICE_LAUNCHED: return "IS_DEVICE_LAUNCHED";
        case KERNEL_FIELD_LAUNCH_PRIORITY: return "LAUNCH_PRIORITY";
        case KERNEL_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityApiFieldIdsString(
    CUpti_ActivityApiFieldIds e)
{
    switch(e)
    {
        case API_FIELD_KIND: return "KIND";
        case API_FIELD_CBID: return "CBID";
        case API_FIELD_START: return "START";
        case API_FIELD_END: return "END";
        case API_FIELD_PROCESS_ID: return "PROCESS_ID";
        case API_FIELD_THREAD_ID: return "THREAD_ID";
        case API_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case API_FIELD_RETURN_VALUE: return "RETURN_VALUE";
        case API_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityDeviceFieldIdsString(
    CUpti_ActivityDeviceFieldIds e)
{
    switch(e)
    {
        case DEVICE_FIELD_KIND: return "KIND";
        case DEVICE_FIELD_FLAGS: return "FLAGS";
        case DEVICE_FIELD_GLOBAL_MEMORY_BANDWIDTH: return "GLOBAL_MEMORY_BANDWIDTH";
        case DEVICE_FIELD_GLOBAL_MEMORY_SIZE: return "GLOBAL_MEMORY_SIZE";
        case DEVICE_FIELD_CONSTANT_MEMORY_SIZE: return "CONSTANT_MEMORY_SIZE";
        case DEVICE_FIELD_L2_CACHE_SIZE: return "L2_CACHE_SIZE";
        case DEVICE_FIELD_NUM_THREADS_PER_WARP: return "NUM_THREADS_PER_WARP";
        case DEVICE_FIELD_CORE_CLOCK_RATE: return "CORE_CLOCK_RATE";
        case DEVICE_FIELD_NUM_MEMCPY_ENGINES: return "NUM_MEMCPY_ENGINES";
        case DEVICE_FIELD_NUM_MULTIPROCESSORS: return "NUM_MULTIPROCESSORS";
        case DEVICE_FIELD_MAX_IPC: return "MAX_IPC";
        case DEVICE_FIELD_MAX_WARPS_PER_MULTIPROCESSOR: return "MAX_WARPS_PER_MULTIPROCESSOR";
        case DEVICE_FIELD_MAX_BLOCKS_PER_MULTIPROCESSOR: return "MAX_BLOCKS_PER_MULTIPROCESSOR";
        case DEVICE_FIELD_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR: return "MAX_SHARED_MEMORY_PER_MULTIPROCESSOR";
        case DEVICE_FIELD_MAX_REGISTERS_PER_MULTIPROCESSOR: return "MAX_REGISTERS_PER_MULTIPROCESSOR";
        case DEVICE_FIELD_MAX_REGISTERS_PER_BLOCK: return "MAX_REGISTERS_PER_BLOCK";
        case DEVICE_FIELD_MAX_SHARED_MEMORY_PER_BLOCK: return "MAX_SHARED_MEMORY_PER_BLOCK";
        case DEVICE_FIELD_MAX_THREADS_PER_BLOCK: return "MAX_THREADS_PER_BLOCK";
        case DEVICE_FIELD_MAX_BLOCK_DIM_X: return "MAX_BLOCK_DIM_X";
        case DEVICE_FIELD_MAX_BLOCK_DIM_Y: return "MAX_BLOCK_DIM_Y";
        case DEVICE_FIELD_MAX_BLOCK_DIM_Z: return "MAX_BLOCK_DIM_Z";
        case DEVICE_FIELD_MAX_GRID_DIM_X: return "MAX_GRID_DIM_X";
        case DEVICE_FIELD_MAX_GRID_DIM_Y: return "MAX_GRID_DIM_Y";
        case DEVICE_FIELD_MAX_GRID_DIM_Z: return "MAX_GRID_DIM_Z";
        case DEVICE_FIELD_COMPUTE_CAPABILITY_MAJOR: return "COMPUTE_CAPABILITY_MAJOR";
        case DEVICE_FIELD_COMPUTE_CAPABILITY_MINOR: return "COMPUTE_CAPABILITY_MINOR";
        case DEVICE_FIELD_ID: return "ID";
        case DEVICE_FIELD_ECC_ENABLED: return "ECC_ENABLED";
        case DEVICE_FIELD_UUID: return "UUID";
        case DEVICE_FIELD_NAME: return "NAME";
        case DEVICE_FIELD_IS_CUDA_VISIBLE: return "IS_CUDA_VISIBLE";
        case DEVICE_FIELD_IS_MIG_ENABLED: return "IS_MIG_ENABLED";
        case DEVICE_FIELD_GPU_INSTANCE_ID: return "GPU_INSTANCE_ID";
        case DEVICE_FIELD_COMPUTE_INSTANCE_ID: return "COMPUTE_INSTANCE_ID";
        case DEVICE_FIELD_MIG_UUID: return "MIG_UUID";
        case DEVICE_FIELD_IS_NUMA_NODE: return "IS_NUMA_NODE";
        case DEVICE_FIELD_NUMA_ID: return "NUMA_ID";
        case DEVICE_FIELD_NUM_TPCS: return "NUM_TPCS";
        case DEVICE_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityContextFieldIdsString(
    CUpti_ActivityContextFieldIds e)
{
    switch(e)
    {
        case CONTEXT_FIELD_KIND: return "KIND";
        case CONTEXT_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case CONTEXT_FIELD_DEVICE_ID: return "DEVICE_ID";
        case CONTEXT_FIELD_COMPUTE_API_KIND: return "COMPUTE_API_KIND";
        case CONTEXT_FIELD_NULL_STREAM_ID: return "NULL_STREAM_ID";
        case CONTEXT_FIELD_PARENT_CONTEXT_ID: return "PARENT_CONTEXT_ID";
        case CONTEXT_FIELD_IS_GREEN_CONTEXT: return "IS_GREEN_CONTEXT";
        case CONTEXT_FIELD_NUM_MULTIPROCESSORS: return "NUM_MULTIPROCESSORS";
        case CONTEXT_FIELD_CIG_MODE: return "CIG_MODE";
        case CONTEXT_FIELD_PROCESS_ID: return "PROCESS_ID";
        case CONTEXT_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityNameFieldIdsString(
    CUpti_ActivityNameFieldIds e)
{
    switch(e)
    {
        case NAME_FIELD_KIND: return "KIND";
        case NAME_FIELD_OBJECT_KIND: return "OBJECT_KIND";
        case NAME_FIELD_OBJECT_ID: return "OBJECT_ID";
        case NAME_FIELD_NAME: return "NAME";
        case NAME_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMarkerFieldIdsString(
    CUpti_ActivityMarkerFieldIds e)
{
    switch(e)
    {
        case MARKER_FIELD_KIND: return "KIND";
        case MARKER_FIELD_FLAGS: return "FLAGS";
        case MARKER_FIELD_TIMESTAMP: return "TIMESTAMP";
        case MARKER_FIELD_ID: return "ID";
        case MARKER_FIELD_PROCESS_ID: return "PROCESS_ID";
        case MARKER_FIELD_THREAD_ID: return "THREAD_ID";
        case MARKER_FIELD_NAME: return "NAME";
        case MARKER_FIELD_DOMAIN: return "DOMAIN";
        case MARKER_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMarkerDataFieldIdsString(
    CUpti_ActivityMarkerDataFieldIds e)
{
    switch(e)
    {
        case MARKER_DATA_FIELD_KIND: return "KIND";
        case MARKER_DATA_FIELD_FLAGS: return "FLAGS";
        case MARKER_DATA_FIELD_ID: return "ID";
        case MARKER_DATA_FIELD_PAYLOAD_KIND: return "PAYLOAD_KIND";
        case MARKER_DATA_FIELD_PAYLOAD: return "PAYLOAD";
        case MARKER_DATA_FIELD_COLOR: return "COLOR";
        case MARKER_DATA_FIELD_CATEGORY: return "CATEGORY";
        case MARKER_DATA_FIELD_CUPTI_DOMAIN_ID: return "CUPTI_DOMAIN_ID";
        case MARKER_DATA_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityOverheadFieldIdsString(
    CUpti_ActivityOverheadFieldIds e)
{
    switch(e)
    {
        case OVERHEAD_FIELD_KIND: return "KIND";
        case OVERHEAD_FIELD_OVERHEAD_KIND: return "OVERHEAD_KIND";
        case OVERHEAD_FIELD_PROCESS_ID: return "PROCESS_ID";
        case OVERHEAD_FIELD_THREAD_ID: return "THREAD_ID";
        case OVERHEAD_FIELD_START: return "START";
        case OVERHEAD_FIELD_END: return "END";
        case OVERHEAD_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case OVERHEAD_FIELD_OVERHEAD_DATA: return "OVERHEAD_DATA";
        case OVERHEAD_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityUvmCounterFieldIdsString(
    CUpti_ActivityUvmCounterFieldIds e)
{
    switch(e)
    {
        case UVM_COUNTER_FIELD_KIND: return "KIND";
        case UVM_COUNTER_FIELD_COUNTER_KIND: return "COUNTER_KIND";
        case UVM_COUNTER_FIELD_VALUE: return "VALUE";
        case UVM_COUNTER_FIELD_START: return "START";
        case UVM_COUNTER_FIELD_END: return "END";
        case UVM_COUNTER_FIELD_ADDRESS: return "ADDRESS";
        case UVM_COUNTER_FIELD_SRC_ID: return "SRC_ID";
        case UVM_COUNTER_FIELD_DST_ID: return "DST_ID";
        case UVM_COUNTER_FIELD_STREAM_ID: return "STREAM_ID";
        case UVM_COUNTER_FIELD_PROCESS_ID: return "PROCESS_ID";
        case UVM_COUNTER_FIELD_FLAGS: return "FLAGS";
        case UVM_COUNTER_FIELD_PROCESSORS: return "PROCESSORS";
        case UVM_COUNTER_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityCudaEventFieldIdsString(
    CUpti_ActivityCudaEventFieldIds e)
{
    switch(e)
    {
        case CUDA_EVENT_FIELD_KIND: return "KIND";
        case CUDA_EVENT_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case CUDA_EVENT_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case CUDA_EVENT_FIELD_STREAM_ID: return "STREAM_ID";
        case CUDA_EVENT_FIELD_EVENT_ID: return "EVENT_ID";
        case CUDA_EVENT_FIELD_DEVICE_ID: return "DEVICE_ID";
        case CUDA_EVENT_FIELD_DEVICE_TIMESTAMP: return "DEVICE_TIMESTAMP";
        case CUDA_EVENT_FIELD_CUDA_EVENT_SYNC_ID: return "CUDA_EVENT_SYNC_ID";
        case CUDA_EVENT_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityStreamFieldIdsString(
    CUpti_ActivityStreamFieldIds e)
{
    switch(e)
    {
        case STREAM_FIELD_KIND: return "KIND";
        case STREAM_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case STREAM_FIELD_STREAM_ID: return "STREAM_ID";
        case STREAM_FIELD_PRIORITY: return "PRIORITY";
        case STREAM_FIELD_FLAG: return "FLAG";
        case STREAM_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case STREAM_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivitySynchronizationFieldIdsString(
    CUpti_ActivitySynchronizationFieldIds e)
{
    switch(e)
    {
        case SYNCHRONIZATION_FIELD_KIND: return "KIND";
        case SYNCHRONIZATION_FIELD_TYPE: return "TYPE";
        case SYNCHRONIZATION_FIELD_START: return "START";
        case SYNCHRONIZATION_FIELD_END: return "END";
        case SYNCHRONIZATION_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case SYNCHRONIZATION_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case SYNCHRONIZATION_FIELD_STREAM_ID: return "STREAM_ID";
        case SYNCHRONIZATION_FIELD_CUDA_EVENT_ID: return "CUDA_EVENT_ID";
        case SYNCHRONIZATION_FIELD_CUDA_EVENT_SYNC_ID: return "CUDA_EVENT_SYNC_ID";
        case SYNCHRONIZATION_FIELD_RETURN_VALUE: return "RETURN_VALUE";
        case SYNCHRONIZATION_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetOpenAccEventKindString(
    CUpti_OpenAccEventKind e)
{
    switch(e)
    {
        case CUPTI_OPENACC_EVENT_KIND_INVALID: return "INVALID";
        case CUPTI_OPENACC_EVENT_KIND_DEVICE_INIT: return "DEVICE_INIT";
        case CUPTI_OPENACC_EVENT_KIND_DEVICE_SHUTDOWN: return "DEVICE_SHUTDOWN";
        case CUPTI_OPENACC_EVENT_KIND_RUNTIME_SHUTDOWN: return "RUNTIME_SHUTDOWN";
        case CUPTI_OPENACC_EVENT_KIND_ENQUEUE_LAUNCH: return "ENQUEUE_LAUNCH";
        case CUPTI_OPENACC_EVENT_KIND_ENQUEUE_UPLOAD: return "ENQUEUE_UPLOAD";
        case CUPTI_OPENACC_EVENT_KIND_ENQUEUE_DOWNLOAD: return "ENQUEUE_DOWNLOAD";
        case CUPTI_OPENACC_EVENT_KIND_WAIT: return "WAIT";
        case CUPTI_OPENACC_EVENT_KIND_IMPLICIT_WAIT: return "IMPLICIT_WAIT";
        case CUPTI_OPENACC_EVENT_KIND_COMPUTE_CONSTRUCT: return "COMPUTE_CONSTRUCT";
        case CUPTI_OPENACC_EVENT_KIND_UPDATE: return "UPDATE";
        case CUPTI_OPENACC_EVENT_KIND_ENTER_DATA: return "ENTER_DATA";
        case CUPTI_OPENACC_EVENT_KIND_EXIT_DATA: return "EXIT_DATA";
        case CUPTI_OPENACC_EVENT_KIND_CREATE: return "CREATE";
        case CUPTI_OPENACC_EVENT_KIND_DELETE: return "DELETE";
        case CUPTI_OPENACC_EVENT_KIND_ALLOC: return "ALLOC";
        case CUPTI_OPENACC_EVENT_KIND_FREE: return "FREE";
        case CUPTI_OPENACC_EVENT_KIND_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetOpenAccConstructKindString(
    CUpti_OpenAccConstructKind e)
{
    switch(e)
    {
        case CUPTI_OPENACC_CONSTRUCT_KIND_UNKNOWN: return "UNKNOWN";
        case CUPTI_OPENACC_CONSTRUCT_KIND_PARALLEL: return "PARALLEL";
        case CUPTI_OPENACC_CONSTRUCT_KIND_KERNELS: return "KERNELS";
        case CUPTI_OPENACC_CONSTRUCT_KIND_LOOP: return "LOOP";
        case CUPTI_OPENACC_CONSTRUCT_KIND_DATA: return "DATA";
        case CUPTI_OPENACC_CONSTRUCT_KIND_ENTER_DATA: return "ENTER_DATA";
        case CUPTI_OPENACC_CONSTRUCT_KIND_EXIT_DATA: return "EXIT_DATA";
        case CUPTI_OPENACC_CONSTRUCT_KIND_HOST_DATA: return "HOST_DATA";
        case CUPTI_OPENACC_CONSTRUCT_KIND_ATOMIC: return "ATOMIC";
        case CUPTI_OPENACC_CONSTRUCT_KIND_DECLARE: return "DECLARE";
        case CUPTI_OPENACC_CONSTRUCT_KIND_INIT: return "INIT";
        case CUPTI_OPENACC_CONSTRUCT_KIND_SHUTDOWN: return "SHUTDOWN";
        case CUPTI_OPENACC_CONSTRUCT_KIND_SET: return "SET";
        case CUPTI_OPENACC_CONSTRUCT_KIND_UPDATE: return "UPDATE";
        case CUPTI_OPENACC_CONSTRUCT_KIND_ROUTINE: return "ROUTINE";
        case CUPTI_OPENACC_CONSTRUCT_KIND_WAIT: return "WAIT";
        case CUPTI_OPENACC_CONSTRUCT_KIND_RUNTIME_API: return "RUNTIME_API";
        case CUPTI_OPENACC_CONSTRUCT_KIND_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetOpenMpEventKindString(
    CUpti_OpenMpEventKind e)
{
    switch(e)
    {
        case CUPTI_OPENMP_EVENT_KIND_INVALID: return "INVALID";
        case CUPTI_OPENMP_EVENT_KIND_PARALLEL: return "PARALLEL";
        case CUPTI_OPENMP_EVENT_KIND_TASK: return "TASK";
        case CUPTI_OPENMP_EVENT_KIND_THREAD: return "THREAD";
        case CUPTI_OPENMP_EVENT_KIND_IDLE: return "IDLE";
        case CUPTI_OPENMP_EVENT_KIND_WAIT_BARRIER: return "WAIT_BARRIER";
        case CUPTI_OPENMP_EVENT_KIND_WAIT_TASKWAIT: return "WAIT_TASKWAIT";
        case CUPTI_OPENMP_EVENT_KIND_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetExternalCorrelationKindString(
    CUpti_ExternalCorrelationKind e)
{
    switch(e)
    {
        case CUPTI_EXTERNAL_CORRELATION_KIND_INVALID: return "INVALID";
        case CUPTI_EXTERNAL_CORRELATION_KIND_UNKNOWN: return "UNKNOWN";
        case CUPTI_EXTERNAL_CORRELATION_KIND_OPENACC: return "OPENACC";
        case CUPTI_EXTERNAL_CORRELATION_KIND_CUSTOM0: return "CUSTOM0";
        case CUPTI_EXTERNAL_CORRELATION_KIND_CUSTOM1: return "CUSTOM1";
        case CUPTI_EXTERNAL_CORRELATION_KIND_CUSTOM2: return "CUSTOM2";
        case CUPTI_EXTERNAL_CORRELATION_KIND_SIZE: return "SIZE";
        case CUPTI_EXTERNAL_CORRELATION_KIND_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityExternalCorrelationFieldIdsString(
    CUpti_ActivityExternalCorrelationFieldIds e)
{
    switch(e)
    {
        case EXTERNAL_CORRELATION_FIELD_KIND: return "KIND";
        case EXTERNAL_CORRELATION_FIELD_EXTERNAL_KIND: return "EXTERNAL_KIND";
        case EXTERNAL_CORRELATION_FIELD_EXTERNAL_ID: return "EXTERNAL_ID";
        case EXTERNAL_CORRELATION_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case EXTERNAL_CORRELATION_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetDevTypeString(
    CUpti_DevType e)
{
    switch(e)
    {
        case CUPTI_DEV_TYPE_INVALID: return "INVALID";
        case CUPTI_DEV_TYPE_GPU: return "GPU";
        case CUPTI_DEV_TYPE_NPU: return "NPU";
        case CUPTI_DEV_TYPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetPcieDeviceTypeString(
    CUpti_PcieDeviceType e)
{
    switch(e)
    {
        case CUPTI_PCIE_DEVICE_TYPE_GPU: return "GPU";
        case CUPTI_PCIE_DEVICE_TYPE_BRIDGE: return "BRIDGE";
        case CUPTI_PCIE_DEVICE_TYPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetPcieGenString(
    CUpti_PcieGen e)
{
    switch(e)
    {
        case CUPTI_PCIE_GEN_GEN1: return "GEN1";
        case CUPTI_PCIE_GEN_GEN2: return "GEN2";
        case CUPTI_PCIE_GEN_GEN3: return "GEN3";
        case CUPTI_PCIE_GEN_GEN4: return "GEN4";
        case CUPTI_PCIE_GEN_GEN5: return "GEN5";
        case CUPTI_PCIE_GEN_GEN6: return "GEN6";
        case CUPTI_PCIE_GEN_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetConfidentialComputeRotationEventTypeString(
    CUpti_ConfidentialComputeRotationEventType e)
{
    switch(e)
    {
        case CUPTI_CONFIDENTIAL_COMPUTE_INVALID_ROTATION_EVENT: return "INVALID_ROTATION_EVENT";
        case CUPTI_CONFIDENTIAL_COMPUTE_KEY_ROTATION_CHANNEL_BLOCKED: return "KEY_ROTATION_CHANNEL_BLOCKED";
        case CUPTI_CONFIDENTIAL_COMPUTE_KEY_ROTATION_CHANNEL_DRAINED: return "KEY_ROTATION_CHANNEL_DRAINED";
        case CUPTI_CONFIDENTIAL_COMPUTE_KEY_ROTATION_CHANNEL_UNBLOCKED: return "KEY_ROTATION_CHANNEL_UNBLOCKED";
        case CUPTI_CONFIDENTIAL_COMPUTE_EVENT_TYPE_FORCE_INT: return "EVENT_TYPE_FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityConfidentialComputeRotationFieldIdsString(
    CUpti_ActivityConfidentialComputeRotationFieldIds e)
{
    switch(e)
    {
        case CONFIDENTIAL_COMPUTE_ROTATION_FIELD_KIND: return "KIND";
        case CONFIDENTIAL_COMPUTE_ROTATION_FIELD_EVENT_TYPE: return "EVENT_TYPE";
        case CONFIDENTIAL_COMPUTE_ROTATION_FIELD_DEVICE_ID: return "DEVICE_ID";
        case CONFIDENTIAL_COMPUTE_ROTATION_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case CONFIDENTIAL_COMPUTE_ROTATION_FIELD_CHANNEL_ID: return "CHANNEL_ID";
        case CONFIDENTIAL_COMPUTE_ROTATION_FIELD_CHANNEL_TYPE: return "CHANNEL_TYPE";
        case CONFIDENTIAL_COMPUTE_ROTATION_FIELD_TIMESTAMP: return "TIMESTAMP";
        case CONFIDENTIAL_COMPUTE_ROTATION_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityJitEntryTypeString(
    CUpti_ActivityJitEntryType e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_JIT_ENTRY_INVALID: return "INVALID";
        case CUPTI_ACTIVITY_JIT_ENTRY_PTX_TO_CUBIN: return "PTX_TO_CUBIN";
        case CUPTI_ACTIVITY_JIT_ENTRY_NVVM_IR_TO_PTX: return "NVVM_IR_TO_PTX";
        case CUPTI_ACTIVITY_JIT_ENTRY_TYPE_FORCE_INT: return "TYPE_FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityJitOperationTypeString(
    CUpti_ActivityJitOperationType e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_JIT_OPERATION_INVALID: return "INVALID";
        case CUPTI_ACTIVITY_JIT_OPERATION_CACHE_LOAD: return "CACHE_LOAD";
        case CUPTI_ACTIVITY_JIT_OPERATION_CACHE_STORE: return "CACHE_STORE";
        case CUPTI_ACTIVITY_JIT_OPERATION_COMPILE: return "COMPILE";
        case CUPTI_ACTIVITY_JIT_OPERATION_TYPE_FORCE_INT: return "TYPE_FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityJitFieldIdsString(
    CUpti_ActivityJitFieldIds e)
{
    switch(e)
    {
        case JIT_FIELD_KIND: return "KIND";
        case JIT_FIELD_ENTRY_TYPE: return "ENTRY_TYPE";
        case JIT_FIELD_OPERATION_TYPE: return "OPERATION_TYPE";
        case JIT_FIELD_DEVICE_ID: return "DEVICE_ID";
        case JIT_FIELD_START: return "START";
        case JIT_FIELD_END: return "END";
        case JIT_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case JIT_FIELD_OPERATION_CORRELATION_ID: return "OPERATION_CORRELATION_ID";
        case JIT_FIELD_CACHE_SIZE: return "CACHE_SIZE";
        case JIT_FIELD_CACHE_PATH: return "CACHE_PATH";
        case JIT_FIELD_PROCESS_ID: return "PROCESS_ID";
        case JIT_FIELD_THREAD_ID: return "THREAD_ID";
        case JIT_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityGraphTraceFieldIdsString(
    CUpti_ActivityGraphTraceFieldIds e)
{
    switch(e)
    {
        case GRAPH_TRACE_FIELD_KIND: return "KIND";
        case GRAPH_TRACE_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case GRAPH_TRACE_FIELD_START: return "START";
        case GRAPH_TRACE_FIELD_END: return "END";
        case GRAPH_TRACE_FIELD_DEVICE_ID: return "DEVICE_ID";
        case GRAPH_TRACE_FIELD_GRAPH_ID: return "GRAPH_ID";
        case GRAPH_TRACE_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case GRAPH_TRACE_FIELD_STREAM_ID: return "STREAM_ID";
        case GRAPH_TRACE_FIELD_END_DEVICE_ID: return "END_DEVICE_ID";
        case GRAPH_TRACE_FIELD_END_CONTEXT_ID: return "END_CONTEXT_ID";
        case GRAPH_TRACE_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetDeviceGraphLaunchModeString(
    CUpti_DeviceGraphLaunchMode e)
{
    switch(e)
    {
        case CUPTI_DEVICE_GRAPH_LAUNCH_MODE_INVALID: return "INVALID";
        case CUPTI_DEVICE_GRAPH_LAUNCH_MODE_FIRE_AND_FORGET: return "FIRE_AND_FORGET";
        case CUPTI_DEVICE_GRAPH_LAUNCH_MODE_TAIL: return "TAIL";
        case CUPTI_DEVICE_GRAPH_LAUNCH_MODE_FIRE_AND_FORGET_AS_SIBLING: return "FIRE_AND_FORGET_AS_SIBLING";
        default: return "<unknown>";
    }
}

static const char*
GetActivityDeviceGraphTraceFieldIdsString(
    CUpti_ActivityDeviceGraphTraceFieldIds e)
{
    switch(e)
    {
        case DEVICE_GRAPH_TRACE_FIELD_KIND: return "KIND";
        case DEVICE_GRAPH_TRACE_FIELD_DEVICE_ID: return "DEVICE_ID";
        case DEVICE_GRAPH_TRACE_FIELD_START: return "START";
        case DEVICE_GRAPH_TRACE_FIELD_END: return "END";
        case DEVICE_GRAPH_TRACE_FIELD_GRAPH_ID: return "GRAPH_ID";
        case DEVICE_GRAPH_TRACE_FIELD_LAUNCHER_GRAPH_ID: return "LAUNCHER_GRAPH_ID";
        case DEVICE_GRAPH_TRACE_FIELD_DEVICE_LAUNCH_MODE: return "DEVICE_LAUNCH_MODE";
        case DEVICE_GRAPH_TRACE_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case DEVICE_GRAPH_TRACE_FIELD_STREAM_ID: return "STREAM_ID";
        case DEVICE_GRAPH_TRACE_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityMemDecompressFieldIdsString(
    CUpti_ActivityMemDecompressFieldIds e)
{
    switch(e)
    {
        case MEM_DECOMPRESS_FIELD_KIND: return "KIND";
        case MEM_DECOMPRESS_FIELD_DEVICE_ID: return "DEVICE_ID";
        case MEM_DECOMPRESS_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case MEM_DECOMPRESS_FIELD_STREAM_ID: return "STREAM_ID";
        case MEM_DECOMPRESS_FIELD_CHANNEL_ID: return "CHANNEL_ID";
        case MEM_DECOMPRESS_FIELD_CHANNEL_TYPE: return "CHANNEL_TYPE";
        case MEM_DECOMPRESS_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case MEM_DECOMPRESS_FIELD_NUMBER_OF_OPERATIONS: return "NUMBER_OF_OPERATIONS";
        case MEM_DECOMPRESS_FIELD_SOURCE_BYTES: return "SOURCE_BYTES";
        case MEM_DECOMPRESS_FIELD_START: return "START";
        case MEM_DECOMPRESS_FIELD_END: return "END";
        case MEM_DECOMPRESS_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityGraphHostNodeFieldIdsString(
    CUpti_ActivityGraphHostNodeFieldIds e)
{
    switch(e)
    {
        case GRAPH_HOST_NODE_FIELD_KIND: return "KIND";
        case GRAPH_HOST_NODE_FIELD_STREAM_ID: return "STREAM_ID";
        case GRAPH_HOST_NODE_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case GRAPH_HOST_NODE_FIELD_DEVICE_ID: return "DEVICE_ID";
        case GRAPH_HOST_NODE_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case GRAPH_HOST_NODE_FIELD_GRAPH_ID: return "GRAPH_ID";
        case GRAPH_HOST_NODE_FIELD_GRAPH_NODE_ID: return "GRAPH_NODE_ID";
        case GRAPH_HOST_NODE_FIELD_PROCESS_ID: return "PROCESS_ID";
        case GRAPH_HOST_NODE_FIELD_THREAD_ID: return "THREAD_ID";
        case GRAPH_HOST_NODE_FIELD_START: return "START";
        case GRAPH_HOST_NODE_FIELD_END: return "END";
        case GRAPH_HOST_NODE_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetComputeEngineCtxSwitchOperationTypeString(
    CUpti_ComputeEngineCtxSwitchOperationType e)
{
    switch(e)
    {
        case CUPTI_COMPUTE_ENGINE_CTX_SWITCH_OPERATION_INVALID: return "INVALID";
        case CUPTI_COMPUTE_ENGINE_CTX_SWITCH_OPERATION_START: return "START";
        case CUPTI_COMPUTE_ENGINE_CTX_SWITCH_OPERATION_END: return "END";
        case CUPTI_COMPUTE_ENGINE_CTX_SWITCH_OPERATION_COUNT: return "COUNT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityComputeEngineCtxSwitchFieldIdsString(
    CUpti_ActivityComputeEngineCtxSwitchFieldIds e)
{
    switch(e)
    {
        case COMPUTE_ENGINE_CTX_SWITCH_FIELD_KIND: return "KIND";
        case COMPUTE_ENGINE_CTX_SWITCH_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case COMPUTE_ENGINE_CTX_SWITCH_FIELD_TIMESTAMP: return "TIMESTAMP";
        case COMPUTE_ENGINE_CTX_SWITCH_FIELD_OPERATION_TYPE: return "OPERATION_TYPE";
        case COMPUTE_ENGINE_CTX_SWITCH_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityHostLaunchFieldIdsString(
    CUpti_ActivityHostLaunchFieldIds e)
{
    switch(e)
    {
        case HOST_LAUNCH_FIELD_KIND: return "KIND";
        case HOST_LAUNCH_FIELD_STREAM_ID: return "STREAM_ID";
        case HOST_LAUNCH_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case HOST_LAUNCH_FIELD_DEVICE_ID: return "DEVICE_ID";
        case HOST_LAUNCH_FIELD_CORRELATION_ID: return "CORRELATION_ID";
        case HOST_LAUNCH_FIELD_PROCESS_ID: return "PROCESS_ID";
        case HOST_LAUNCH_FIELD_THREAD_ID: return "THREAD_ID";
        case HOST_LAUNCH_FIELD_START: return "START";
        case HOST_LAUNCH_FIELD_END: return "END";
        case HOST_LAUNCH_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityGreenContextFieldIdsString(
    CUpti_ActivityGreenContextFieldIds e)
{
    switch(e)
    {
        case GREEN_CONTEXT_FIELD_KIND: return "KIND";
        case GREEN_CONTEXT_FIELD_CONTEXT_ID: return "CONTEXT_ID";
        case GREEN_CONTEXT_FIELD_PARENT_CONTEXT_ID: return "PARENT_CONTEXT_ID";
        case GREEN_CONTEXT_FIELD_DEVICE_ID: return "DEVICE_ID";
        case GREEN_CONTEXT_FIELD_NUM_MULTIPROCESSORS: return "NUM_MULTIPROCESSORS";
        case GREEN_CONTEXT_FIELD_NUM_TPCS: return "NUM_TPCS";
        case GREEN_CONTEXT_FIELD_LOGICAL_TPC_MASK_SIZE: return "LOGICAL_TPC_MASK_SIZE";
        case GREEN_CONTEXT_FIELD_LOGICAL_TPC_MASK: return "LOGICAL_TPC_MASK";
        case GREEN_CONTEXT_FIELD_WORKQUEUE_RESOURCE_ID: return "WORKQUEUE_RESOURCE_ID";
        case GREEN_CONTEXT_FIELD_WORKQUEUE_CONCURRENCY_LIMIT: return "WORKQUEUE_CONCURRENCY_LIMIT";
        case GREEN_CONTEXT_FIELD_WORKQUEUE_SHARING_SCOPE: return "WORKQUEUE_SHARING_SCOPE";
        case GREEN_CONTEXT_FIELD_MAX: return "MAX";
        default: return "<unknown>";
    }
}

static const char*
GetActivityAttributeString(
    CUpti_ActivityAttribute e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE: return "DEVICE_BUFFER_SIZE";
        case CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE_CDP: return "DEVICE_BUFFER_SIZE_CDP";
        case CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_POOL_LIMIT: return "DEVICE_BUFFER_POOL_LIMIT";
        case CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_POOL_SIZE: return "PROFILING_SEMAPHORE_POOL_SIZE";
        case CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_POOL_LIMIT: return "PROFILING_SEMAPHORE_POOL_LIMIT";
        case CUPTI_ACTIVITY_ATTR_ZEROED_OUT_ACTIVITY_BUFFER: return "ZEROED_OUT_ACTIVITY_BUFFER";
        case CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_PRE_ALLOCATE_VALUE: return "DEVICE_BUFFER_PRE_ALLOCATE_VALUE";
        case CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_PRE_ALLOCATE_VALUE: return "PROFILING_SEMAPHORE_PRE_ALLOCATE_VALUE";
        case CUPTI_ACTIVITY_ATTR_MEM_ALLOCATION_TYPE_HOST_PINNED: return "MEM_ALLOCATION_TYPE_HOST_PINNED";
        case CUPTI_ACTIVITY_ATTR_PER_THREAD_ACTIVITY_BUFFER: return "PER_THREAD_ACTIVITY_BUFFER";
        case CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE_DEVICE_GRAPHS: return "DEVICE_BUFFER_SIZE_DEVICE_GRAPHS";
        case CUPTI_ACTIVITY_ATTR_USER_DEFINED_RECORDS: return "USER_DEFINED_RECORDS";
        case CUPTI_ACTIVITY_ATTR_MULTIPLE_SUBSCRIBER_STATE: return "MULTIPLE_SUBSCRIBER_STATE";
        case CUPTI_ACTIVITY_ATTR_ENABLE_HES: return "ENABLE_HES";
        case CUPTI_ACTIVITY_ATTR_ENABLE_ALLOCATION_SOURCE_TRACKING: return "ENABLE_ALLOCATION_SOURCE_TRACKING";
        case CUPTI_ACTIVITY_ATTR_ENABLE_KERNEL_LATENCY_TIMESTAMPS: return "ENABLE_KERNEL_LATENCY_TIMESTAMPS";
        case CUPTI_ACTIVITY_ATTR_ENABLE_ALL_SYNC_RECORDS: return "ENABLE_ALL_SYNC_RECORDS";
        case CUPTI_ACTIVITY_ATTR_ENABLE_CUDA_EVENT_DEVICE_TIMESTAMPS: return "ENABLE_CUDA_EVENT_DEVICE_TIMESTAMPS";
        case CUPTI_ACTIVITY_ATTR_ENABLE_KERNEL_LAUNCH_ATTRIBUTES: return "ENABLE_KERNEL_LAUNCH_ATTRIBUTES";
        case CUPTI_ACTIVITY_ATTR_ENABLE_DEVICE_GRAPH_TRACE: return "ENABLE_DEVICE_GRAPH_TRACE";
        case CUPTI_ACTIVITY_ATTR_ENABLE_MULTI_SUBSCRIBER_GRAPH_LEVEL_TRACE: return "ENABLE_MULTI_SUBSCRIBER_GRAPH_LEVEL_TRACE";
        case CUPTI_ACTIVITY_ATTR_THREAD_ID_TYPE: return "THREAD_ID_TYPE";
        case CUPTI_ACTIVITY_ATTR_TIMESTAMP_CALLBACK: return "TIMESTAMP_CALLBACK";
        case CUPTI_ACTIVITY_ATTR_CIG_MODE: return "CIG_MODE";
        case CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_FORCE_INT: return "DEVICE_BUFFER_FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetActivityThreadIdTypeString(
    CUpti_ActivityThreadIdType e)
{
    switch(e)
    {
        case CUPTI_ACTIVITY_THREAD_ID_TYPE_DEFAULT: return "DEFAULT";
        case CUPTI_ACTIVITY_THREAD_ID_TYPE_SYSTEM: return "SYSTEM";
        case CUPTI_ACTIVITY_THREAD_ID_TYPE_SIZE: return "SIZE";
        case CUPTI_ACTIVITY_THREAD_ID_TYPE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}

static const char*
GetDeviceVirtualizationModeString(
    CUpti_DeviceVirtualizationMode e)
{
    switch(e)
    {
        case CUPTI_DEVICE_VIRTUALIZATION_MODE_NONE: return "NONE";
        case CUPTI_DEVICE_VIRTUALIZATION_MODE_PASS_THROUGH: return "PASS_THROUGH";
        case CUPTI_DEVICE_VIRTUALIZATION_MODE_VIRTUAL_GPU: return "VIRTUAL_GPU";
        case CUPTI_DEVICE_VIRTUALIZATION_MODE_FORCE_INT: return "FORCE_INT";
        default: return "<unknown>";
    }
}


static CUpti_ActivityKind
GetActivityKindFromString(
    const char *pString)
{
    if (!pString)
    {
        std::cerr << "\n\nError: NULL string.\n\n";
        exit(-1);
    }
    if (!stricmp(pString, "INVALID"))
    {
        return CUPTI_ACTIVITY_KIND_INVALID;
    }
    else if (!stricmp(pString, "MEMCPY"))
    {
        return CUPTI_ACTIVITY_KIND_MEMCPY;
    }
    else if (!stricmp(pString, "MEMSET"))
    {
        return CUPTI_ACTIVITY_KIND_MEMSET;
    }
    else if (!stricmp(pString, "KERNEL"))
    {
        return CUPTI_ACTIVITY_KIND_KERNEL;
    }
    else if (!stricmp(pString, "DRIVER"))
    {
        return CUPTI_ACTIVITY_KIND_DRIVER;
    }
    else if (!stricmp(pString, "RUNTIME"))
    {
        return CUPTI_ACTIVITY_KIND_RUNTIME;
    }
    else if (!stricmp(pString, "EVENT"))
    {
        return CUPTI_ACTIVITY_KIND_EVENT;
    }
    else if (!stricmp(pString, "METRIC"))
    {
        return CUPTI_ACTIVITY_KIND_METRIC;
    }
    else if (!stricmp(pString, "DEVICE"))
    {
        return CUPTI_ACTIVITY_KIND_DEVICE;
    }
    else if (!stricmp(pString, "CONTEXT"))
    {
        return CUPTI_ACTIVITY_KIND_CONTEXT;
    }
    else if (!stricmp(pString, "CONCURRENT_KERNEL"))
    {
        return CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL;
    }
    else if (!stricmp(pString, "NAME"))
    {
        return CUPTI_ACTIVITY_KIND_NAME;
    }
    else if (!stricmp(pString, "MARKER"))
    {
        return CUPTI_ACTIVITY_KIND_MARKER;
    }
    else if (!stricmp(pString, "MARKER_DATA"))
    {
        return CUPTI_ACTIVITY_KIND_MARKER_DATA;
    }
    else if (!stricmp(pString, "SOURCE_LOCATOR"))
    {
        return CUPTI_ACTIVITY_KIND_SOURCE_LOCATOR;
    }
    else if (!stricmp(pString, "GLOBAL_ACCESS"))
    {
        return CUPTI_ACTIVITY_KIND_GLOBAL_ACCESS;
    }
    else if (!stricmp(pString, "BRANCH"))
    {
        return CUPTI_ACTIVITY_KIND_BRANCH;
    }
    else if (!stricmp(pString, "OVERHEAD"))
    {
        return CUPTI_ACTIVITY_KIND_OVERHEAD;
    }
    else if (!stricmp(pString, "CDP_KERNEL"))
    {
        return CUPTI_ACTIVITY_KIND_CDP_KERNEL;
    }
    else if (!stricmp(pString, "PREEMPTION"))
    {
        return CUPTI_ACTIVITY_KIND_PREEMPTION;
    }
    else if (!stricmp(pString, "ENVIRONMENT"))
    {
        return CUPTI_ACTIVITY_KIND_ENVIRONMENT;
    }
    else if (!stricmp(pString, "EVENT_INSTANCE"))
    {
        return CUPTI_ACTIVITY_KIND_EVENT_INSTANCE;
    }
    else if (!stricmp(pString, "MEMCPY2"))
    {
        return CUPTI_ACTIVITY_KIND_MEMCPY2;
    }
    else if (!stricmp(pString, "METRIC_INSTANCE"))
    {
        return CUPTI_ACTIVITY_KIND_METRIC_INSTANCE;
    }
    else if (!stricmp(pString, "INSTRUCTION_EXECUTION"))
    {
        return CUPTI_ACTIVITY_KIND_INSTRUCTION_EXECUTION;
    }
    else if (!stricmp(pString, "UNIFIED_MEMORY_COUNTER"))
    {
        return CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER;
    }
    else if (!stricmp(pString, "FUNCTION"))
    {
        return CUPTI_ACTIVITY_KIND_FUNCTION;
    }
    else if (!stricmp(pString, "MODULE"))
    {
        return CUPTI_ACTIVITY_KIND_MODULE;
    }
    else if (!stricmp(pString, "DEVICE_ATTRIBUTE"))
    {
        return CUPTI_ACTIVITY_KIND_DEVICE_ATTRIBUTE;
    }
    else if (!stricmp(pString, "SHARED_ACCESS"))
    {
        return CUPTI_ACTIVITY_KIND_SHARED_ACCESS;
    }
    else if (!stricmp(pString, "PC_SAMPLING"))
    {
        return CUPTI_ACTIVITY_KIND_PC_SAMPLING;
    }
    else if (!stricmp(pString, "PC_SAMPLING_RECORD_INFO"))
    {
        return CUPTI_ACTIVITY_KIND_PC_SAMPLING_RECORD_INFO;
    }
    else if (!stricmp(pString, "INSTRUCTION_CORRELATION"))
    {
        return CUPTI_ACTIVITY_KIND_INSTRUCTION_CORRELATION;
    }
    else if (!stricmp(pString, "OPENACC_DATA"))
    {
        return CUPTI_ACTIVITY_KIND_OPENACC_DATA;
    }
    else if (!stricmp(pString, "OPENACC_LAUNCH"))
    {
        return CUPTI_ACTIVITY_KIND_OPENACC_LAUNCH;
    }
    else if (!stricmp(pString, "OPENACC_OTHER"))
    {
        return CUPTI_ACTIVITY_KIND_OPENACC_OTHER;
    }
    else if (!stricmp(pString, "CUDA_EVENT"))
    {
        return CUPTI_ACTIVITY_KIND_CUDA_EVENT;
    }
    else if (!stricmp(pString, "STREAM"))
    {
        return CUPTI_ACTIVITY_KIND_STREAM;
    }
    else if (!stricmp(pString, "SYNCHRONIZATION"))
    {
        return CUPTI_ACTIVITY_KIND_SYNCHRONIZATION;
    }
    else if (!stricmp(pString, "EXTERNAL_CORRELATION"))
    {
        return CUPTI_ACTIVITY_KIND_EXTERNAL_CORRELATION;
    }
    else if (!stricmp(pString, "NVLINK"))
    {
        return CUPTI_ACTIVITY_KIND_NVLINK;
    }
    else if (!stricmp(pString, "INSTANTANEOUS_EVENT"))
    {
        return CUPTI_ACTIVITY_KIND_INSTANTANEOUS_EVENT;
    }
    else if (!stricmp(pString, "INSTANTANEOUS_EVENT_INSTANCE"))
    {
        return CUPTI_ACTIVITY_KIND_INSTANTANEOUS_EVENT_INSTANCE;
    }
    else if (!stricmp(pString, "INSTANTANEOUS_METRIC"))
    {
        return CUPTI_ACTIVITY_KIND_INSTANTANEOUS_METRIC;
    }
    else if (!stricmp(pString, "INSTANTANEOUS_METRIC_INSTANCE"))
    {
        return CUPTI_ACTIVITY_KIND_INSTANTANEOUS_METRIC_INSTANCE;
    }
    else if (!stricmp(pString, "MEMORY"))
    {
        return CUPTI_ACTIVITY_KIND_MEMORY;
    }
    else if (!stricmp(pString, "PCIE"))
    {
        return CUPTI_ACTIVITY_KIND_PCIE;
    }
    else if (!stricmp(pString, "OPENMP"))
    {
        return CUPTI_ACTIVITY_KIND_OPENMP;
    }
    else if (!stricmp(pString, "INTERNAL_LAUNCH_API"))
    {
        return CUPTI_ACTIVITY_KIND_INTERNAL_LAUNCH_API;
    }
    else if (!stricmp(pString, "MEMORY2"))
    {
        return CUPTI_ACTIVITY_KIND_MEMORY2;
    }
    else if (!stricmp(pString, "MEMORY_POOL"))
    {
        return CUPTI_ACTIVITY_KIND_MEMORY_POOL;
    }
    else if (!stricmp(pString, "GRAPH_TRACE"))
    {
        return CUPTI_ACTIVITY_KIND_GRAPH_TRACE;
    }
    else if (!stricmp(pString, "JIT"))
    {
        return CUPTI_ACTIVITY_KIND_JIT;
    }
    else if (!stricmp(pString, "DEVICE_GRAPH_TRACE"))
    {
        return CUPTI_ACTIVITY_KIND_DEVICE_GRAPH_TRACE;
    }
    else if (!stricmp(pString, "MEM_DECOMPRESS"))
    {
        return CUPTI_ACTIVITY_KIND_MEM_DECOMPRESS;
    }
    else if (!stricmp(pString, "CONFIDENTIAL_COMPUTE_ROTATION"))
    {
        return CUPTI_ACTIVITY_KIND_CONFIDENTIAL_COMPUTE_ROTATION;
    }
    else if (!stricmp(pString, "GRAPH_HOST_NODE"))
    {
        return CUPTI_ACTIVITY_KIND_GRAPH_HOST_NODE;
    }
    else if (!stricmp(pString, "COMPUTE_ENGINE_CTX_SWITCH"))
    {
        return CUPTI_ACTIVITY_KIND_COMPUTE_ENGINE_CTX_SWITCH;
    }
    else if (!stricmp(pString, "HOST_LAUNCH"))
    {
        return CUPTI_ACTIVITY_KIND_HOST_LAUNCH;
    }
    else if (!stricmp(pString, "GREEN_CONTEXT"))
    {
        return CUPTI_ACTIVITY_KIND_GREEN_CONTEXT;
    }
    else if (!stricmp(pString, "COUNT"))
    {
        return CUPTI_ACTIVITY_KIND_COUNT;
    }
    else if (!stricmp(pString, "FORCE_INT"))
    {
        return CUPTI_ACTIVITY_KIND_FORCE_INT;
    }
    else
    {
        std::cerr << "\n\nError: Invalid string " << pString << " cannot be converted to CUPTI Activity Kind.\n\n";
        return CUPTI_ACTIVITY_KIND_INVALID;
    }
}


static int
GetFieldIdValueFromString(
    CUpti_ActivityKind kind,
    const char *pString)
{
    switch(kind)
    {
        case CUPTI_ACTIVITY_KIND_MEMCPY:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)MEMCPY_FIELD_KIND;
            }
            else if (!stricmp(pString, "COPY_KIND"))
            {
                return (int)MEMCPY_FIELD_COPY_KIND;
            }
            else if (!stricmp(pString, "SRC_KIND"))
            {
                return (int)MEMCPY_FIELD_SRC_KIND;
            }
            else if (!stricmp(pString, "DST_KIND"))
            {
                return (int)MEMCPY_FIELD_DST_KIND;
            }
            else if (!stricmp(pString, "FLAGS"))
            {
                return (int)MEMCPY_FIELD_FLAGS;
            }
            else if (!stricmp(pString, "BYTES"))
            {
                return (int)MEMCPY_FIELD_BYTES;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)MEMCPY_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)MEMCPY_FIELD_END;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)MEMCPY_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)MEMCPY_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)MEMCPY_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)MEMCPY_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "GRAPH_NODE_ID"))
            {
                return (int)MEMCPY_FIELD_GRAPH_NODE_ID;
            }
            else if (!stricmp(pString, "GRAPH_ID"))
            {
                return (int)MEMCPY_FIELD_GRAPH_ID;
            }
            else if (!stricmp(pString, "CHANNEL_ID"))
            {
                return (int)MEMCPY_FIELD_CHANNEL_ID;
            }
            else if (!stricmp(pString, "CHANNEL_TYPE"))
            {
                return (int)MEMCPY_FIELD_CHANNEL_TYPE;
            }
            else if (!stricmp(pString, "IS_DEVICE_LAUNCHED"))
            {
                return (int)MEMCPY_FIELD_IS_DEVICE_LAUNCHED;
            }
            else if (!stricmp(pString, "COPY_COUNT"))
            {
                return (int)MEMCPY_FIELD_COPY_COUNT;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)MEMCPY_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_MEMSET:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)MEMSET_FIELD_KIND;
            }
            else if (!stricmp(pString, "VALUE"))
            {
                return (int)MEMSET_FIELD_VALUE;
            }
            else if (!stricmp(pString, "BYTES"))
            {
                return (int)MEMSET_FIELD_BYTES;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)MEMSET_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)MEMSET_FIELD_END;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)MEMSET_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)MEMSET_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)MEMSET_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)MEMSET_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "FLAGS"))
            {
                return (int)MEMSET_FIELD_FLAGS;
            }
            else if (!stricmp(pString, "MEMORY_KIND"))
            {
                return (int)MEMSET_FIELD_MEMORY_KIND;
            }
            else if (!stricmp(pString, "GRAPH_NODE_ID"))
            {
                return (int)MEMSET_FIELD_GRAPH_NODE_ID;
            }
            else if (!stricmp(pString, "GRAPH_ID"))
            {
                return (int)MEMSET_FIELD_GRAPH_ID;
            }
            else if (!stricmp(pString, "CHANNEL_ID"))
            {
                return (int)MEMSET_FIELD_CHANNEL_ID;
            }
            else if (!stricmp(pString, "CHANNEL_TYPE"))
            {
                return (int)MEMSET_FIELD_CHANNEL_TYPE;
            }
            else if (!stricmp(pString, "IS_DEVICE_LAUNCHED"))
            {
                return (int)MEMSET_FIELD_IS_DEVICE_LAUNCHED;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)MEMSET_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_KERNEL:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)KERNEL_FIELD_KIND;
            }
            else if (!stricmp(pString, "CACHE_CONFIG_REQUESTED"))
            {
                return (int)KERNEL_FIELD_CACHE_CONFIG_REQUESTED;
            }
            else if (!stricmp(pString, "CACHE_CONFIG_EXECUTED"))
            {
                return (int)KERNEL_FIELD_CACHE_CONFIG_EXECUTED;
            }
            else if (!stricmp(pString, "SHARED_MEMORY_CONFIG"))
            {
                return (int)KERNEL_FIELD_SHARED_MEMORY_CONFIG;
            }
            else if (!stricmp(pString, "REGISTERS_PER_THREAD"))
            {
                return (int)KERNEL_FIELD_REGISTERS_PER_THREAD;
            }
            else if (!stricmp(pString, "PARTITIONED_GLOBAL_CACHE_REQUESTED"))
            {
                return (int)KERNEL_FIELD_PARTITIONED_GLOBAL_CACHE_REQUESTED;
            }
            else if (!stricmp(pString, "PARTITIONED_GLOBAL_CACHE_EXECUTED"))
            {
                return (int)KERNEL_FIELD_PARTITIONED_GLOBAL_CACHE_EXECUTED;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)KERNEL_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)KERNEL_FIELD_END;
            }
            else if (!stricmp(pString, "COMPLETED"))
            {
                return (int)KERNEL_FIELD_COMPLETED;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)KERNEL_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)KERNEL_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)KERNEL_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "GRID_X"))
            {
                return (int)KERNEL_FIELD_GRID_X;
            }
            else if (!stricmp(pString, "GRID_Y"))
            {
                return (int)KERNEL_FIELD_GRID_Y;
            }
            else if (!stricmp(pString, "GRID_Z"))
            {
                return (int)KERNEL_FIELD_GRID_Z;
            }
            else if (!stricmp(pString, "BLOCK_X"))
            {
                return (int)KERNEL_FIELD_BLOCK_X;
            }
            else if (!stricmp(pString, "BLOCK_Y"))
            {
                return (int)KERNEL_FIELD_BLOCK_Y;
            }
            else if (!stricmp(pString, "BLOCK_Z"))
            {
                return (int)KERNEL_FIELD_BLOCK_Z;
            }
            else if (!stricmp(pString, "STATIC_SHARED_MEMORY"))
            {
                return (int)KERNEL_FIELD_STATIC_SHARED_MEMORY;
            }
            else if (!stricmp(pString, "DYNAMIC_SHARED_MEMORY"))
            {
                return (int)KERNEL_FIELD_DYNAMIC_SHARED_MEMORY;
            }
            else if (!stricmp(pString, "LOCAL_MEMORY_PER_THREAD"))
            {
                return (int)KERNEL_FIELD_LOCAL_MEMORY_PER_THREAD;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)KERNEL_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "GRID_ID"))
            {
                return (int)KERNEL_FIELD_GRID_ID;
            }
            else if (!stricmp(pString, "NAME"))
            {
                return (int)KERNEL_FIELD_NAME;
            }
            else if (!stricmp(pString, "QUEUED"))
            {
                return (int)KERNEL_FIELD_QUEUED;
            }
            else if (!stricmp(pString, "SUBMITTED"))
            {
                return (int)KERNEL_FIELD_SUBMITTED;
            }
            else if (!stricmp(pString, "LAUNCH_TYPE"))
            {
                return (int)KERNEL_FIELD_LAUNCH_TYPE;
            }
            else if (!stricmp(pString, "IS_SHARED_MEMORY_CARVEOUT_REQUESTED"))
            {
                return (int)KERNEL_FIELD_IS_SHARED_MEMORY_CARVEOUT_REQUESTED;
            }
            else if (!stricmp(pString, "SHARED_MEMORY_CARVEOUT_REQUESTED"))
            {
                return (int)KERNEL_FIELD_SHARED_MEMORY_CARVEOUT_REQUESTED;
            }
            else if (!stricmp(pString, "SHARED_MEMORY_EXECUTED"))
            {
                return (int)KERNEL_FIELD_SHARED_MEMORY_EXECUTED;
            }
            else if (!stricmp(pString, "GRAPH_NODE_ID"))
            {
                return (int)KERNEL_FIELD_GRAPH_NODE_ID;
            }
            else if (!stricmp(pString, "SHMEM_LIMIT_CONFIG"))
            {
                return (int)KERNEL_FIELD_SHMEM_LIMIT_CONFIG;
            }
            else if (!stricmp(pString, "GRAPH_ID"))
            {
                return (int)KERNEL_FIELD_GRAPH_ID;
            }
            else if (!stricmp(pString, "ACCESS_POLICY_WINDOW"))
            {
                return (int)KERNEL_FIELD_ACCESS_POLICY_WINDOW;
            }
            else if (!stricmp(pString, "CHANNEL_ID"))
            {
                return (int)KERNEL_FIELD_CHANNEL_ID;
            }
            else if (!stricmp(pString, "CHANNEL_TYPE"))
            {
                return (int)KERNEL_FIELD_CHANNEL_TYPE;
            }
            else if (!stricmp(pString, "CLUSTER_X"))
            {
                return (int)KERNEL_FIELD_CLUSTER_X;
            }
            else if (!stricmp(pString, "CLUSTER_Y"))
            {
                return (int)KERNEL_FIELD_CLUSTER_Y;
            }
            else if (!stricmp(pString, "CLUSTER_Z"))
            {
                return (int)KERNEL_FIELD_CLUSTER_Z;
            }
            else if (!stricmp(pString, "CLUSTER_SCHEDULING_POLICY"))
            {
                return (int)KERNEL_FIELD_CLUSTER_SCHEDULING_POLICY;
            }
            else if (!stricmp(pString, "LOCAL_MEMORY_TOTAL"))
            {
                return (int)KERNEL_FIELD_LOCAL_MEMORY_TOTAL;
            }
            else if (!stricmp(pString, "MAX_POTENTIAL_CLUSTER_SIZE"))
            {
                return (int)KERNEL_FIELD_MAX_POTENTIAL_CLUSTER_SIZE;
            }
            else if (!stricmp(pString, "MAX_ACTIVE_CLUSTERS"))
            {
                return (int)KERNEL_FIELD_MAX_ACTIVE_CLUSTERS;
            }
            else if (!stricmp(pString, "IS_DEVICE_LAUNCHED"))
            {
                return (int)KERNEL_FIELD_IS_DEVICE_LAUNCHED;
            }
            else if (!stricmp(pString, "LAUNCH_PRIORITY"))
            {
                return (int)KERNEL_FIELD_LAUNCH_PRIORITY;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)KERNEL_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_DRIVER:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)API_FIELD_KIND;
            }
            else if (!stricmp(pString, "CBID"))
            {
                return (int)API_FIELD_CBID;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)API_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)API_FIELD_END;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)API_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "THREAD_ID"))
            {
                return (int)API_FIELD_THREAD_ID;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)API_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "RETURN_VALUE"))
            {
                return (int)API_FIELD_RETURN_VALUE;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)API_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_DEVICE:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)DEVICE_FIELD_KIND;
            }
            else if (!stricmp(pString, "FLAGS"))
            {
                return (int)DEVICE_FIELD_FLAGS;
            }
            else if (!stricmp(pString, "GLOBAL_MEMORY_BANDWIDTH"))
            {
                return (int)DEVICE_FIELD_GLOBAL_MEMORY_BANDWIDTH;
            }
            else if (!stricmp(pString, "GLOBAL_MEMORY_SIZE"))
            {
                return (int)DEVICE_FIELD_GLOBAL_MEMORY_SIZE;
            }
            else if (!stricmp(pString, "CONSTANT_MEMORY_SIZE"))
            {
                return (int)DEVICE_FIELD_CONSTANT_MEMORY_SIZE;
            }
            else if (!stricmp(pString, "L2_CACHE_SIZE"))
            {
                return (int)DEVICE_FIELD_L2_CACHE_SIZE;
            }
            else if (!stricmp(pString, "NUM_THREADS_PER_WARP"))
            {
                return (int)DEVICE_FIELD_NUM_THREADS_PER_WARP;
            }
            else if (!stricmp(pString, "CORE_CLOCK_RATE"))
            {
                return (int)DEVICE_FIELD_CORE_CLOCK_RATE;
            }
            else if (!stricmp(pString, "NUM_MEMCPY_ENGINES"))
            {
                return (int)DEVICE_FIELD_NUM_MEMCPY_ENGINES;
            }
            else if (!stricmp(pString, "NUM_MULTIPROCESSORS"))
            {
                return (int)DEVICE_FIELD_NUM_MULTIPROCESSORS;
            }
            else if (!stricmp(pString, "MAX_IPC"))
            {
                return (int)DEVICE_FIELD_MAX_IPC;
            }
            else if (!stricmp(pString, "MAX_WARPS_PER_MULTIPROCESSOR"))
            {
                return (int)DEVICE_FIELD_MAX_WARPS_PER_MULTIPROCESSOR;
            }
            else if (!stricmp(pString, "MAX_BLOCKS_PER_MULTIPROCESSOR"))
            {
                return (int)DEVICE_FIELD_MAX_BLOCKS_PER_MULTIPROCESSOR;
            }
            else if (!stricmp(pString, "MAX_SHARED_MEMORY_PER_MULTIPROCESSOR"))
            {
                return (int)DEVICE_FIELD_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR;
            }
            else if (!stricmp(pString, "MAX_REGISTERS_PER_MULTIPROCESSOR"))
            {
                return (int)DEVICE_FIELD_MAX_REGISTERS_PER_MULTIPROCESSOR;
            }
            else if (!stricmp(pString, "MAX_REGISTERS_PER_BLOCK"))
            {
                return (int)DEVICE_FIELD_MAX_REGISTERS_PER_BLOCK;
            }
            else if (!stricmp(pString, "MAX_SHARED_MEMORY_PER_BLOCK"))
            {
                return (int)DEVICE_FIELD_MAX_SHARED_MEMORY_PER_BLOCK;
            }
            else if (!stricmp(pString, "MAX_THREADS_PER_BLOCK"))
            {
                return (int)DEVICE_FIELD_MAX_THREADS_PER_BLOCK;
            }
            else if (!stricmp(pString, "MAX_BLOCK_DIM_X"))
            {
                return (int)DEVICE_FIELD_MAX_BLOCK_DIM_X;
            }
            else if (!stricmp(pString, "MAX_BLOCK_DIM_Y"))
            {
                return (int)DEVICE_FIELD_MAX_BLOCK_DIM_Y;
            }
            else if (!stricmp(pString, "MAX_BLOCK_DIM_Z"))
            {
                return (int)DEVICE_FIELD_MAX_BLOCK_DIM_Z;
            }
            else if (!stricmp(pString, "MAX_GRID_DIM_X"))
            {
                return (int)DEVICE_FIELD_MAX_GRID_DIM_X;
            }
            else if (!stricmp(pString, "MAX_GRID_DIM_Y"))
            {
                return (int)DEVICE_FIELD_MAX_GRID_DIM_Y;
            }
            else if (!stricmp(pString, "MAX_GRID_DIM_Z"))
            {
                return (int)DEVICE_FIELD_MAX_GRID_DIM_Z;
            }
            else if (!stricmp(pString, "COMPUTE_CAPABILITY_MAJOR"))
            {
                return (int)DEVICE_FIELD_COMPUTE_CAPABILITY_MAJOR;
            }
            else if (!stricmp(pString, "COMPUTE_CAPABILITY_MINOR"))
            {
                return (int)DEVICE_FIELD_COMPUTE_CAPABILITY_MINOR;
            }
            else if (!stricmp(pString, "ID"))
            {
                return (int)DEVICE_FIELD_ID;
            }
            else if (!stricmp(pString, "ECC_ENABLED"))
            {
                return (int)DEVICE_FIELD_ECC_ENABLED;
            }
            else if (!stricmp(pString, "UUID"))
            {
                return (int)DEVICE_FIELD_UUID;
            }
            else if (!stricmp(pString, "NAME"))
            {
                return (int)DEVICE_FIELD_NAME;
            }
            else if (!stricmp(pString, "IS_CUDA_VISIBLE"))
            {
                return (int)DEVICE_FIELD_IS_CUDA_VISIBLE;
            }
            else if (!stricmp(pString, "IS_MIG_ENABLED"))
            {
                return (int)DEVICE_FIELD_IS_MIG_ENABLED;
            }
            else if (!stricmp(pString, "GPU_INSTANCE_ID"))
            {
                return (int)DEVICE_FIELD_GPU_INSTANCE_ID;
            }
            else if (!stricmp(pString, "COMPUTE_INSTANCE_ID"))
            {
                return (int)DEVICE_FIELD_COMPUTE_INSTANCE_ID;
            }
            else if (!stricmp(pString, "MIG_UUID"))
            {
                return (int)DEVICE_FIELD_MIG_UUID;
            }
            else if (!stricmp(pString, "IS_NUMA_NODE"))
            {
                return (int)DEVICE_FIELD_IS_NUMA_NODE;
            }
            else if (!stricmp(pString, "NUMA_ID"))
            {
                return (int)DEVICE_FIELD_NUMA_ID;
            }
            else if (!stricmp(pString, "NUM_TPCS"))
            {
                return (int)DEVICE_FIELD_NUM_TPCS;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)DEVICE_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_CONTEXT:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)CONTEXT_FIELD_KIND;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)CONTEXT_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)CONTEXT_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "COMPUTE_API_KIND"))
            {
                return (int)CONTEXT_FIELD_COMPUTE_API_KIND;
            }
            else if (!stricmp(pString, "NULL_STREAM_ID"))
            {
                return (int)CONTEXT_FIELD_NULL_STREAM_ID;
            }
            else if (!stricmp(pString, "PARENT_CONTEXT_ID"))
            {
                return (int)CONTEXT_FIELD_PARENT_CONTEXT_ID;
            }
            else if (!stricmp(pString, "IS_GREEN_CONTEXT"))
            {
                return (int)CONTEXT_FIELD_IS_GREEN_CONTEXT;
            }
            else if (!stricmp(pString, "NUM_MULTIPROCESSORS"))
            {
                return (int)CONTEXT_FIELD_NUM_MULTIPROCESSORS;
            }
            else if (!stricmp(pString, "CIG_MODE"))
            {
                return (int)CONTEXT_FIELD_CIG_MODE;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)CONTEXT_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)CONTEXT_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_NAME:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)NAME_FIELD_KIND;
            }
            else if (!stricmp(pString, "OBJECT_KIND"))
            {
                return (int)NAME_FIELD_OBJECT_KIND;
            }
            else if (!stricmp(pString, "OBJECT_ID"))
            {
                return (int)NAME_FIELD_OBJECT_ID;
            }
            else if (!stricmp(pString, "NAME"))
            {
                return (int)NAME_FIELD_NAME;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)NAME_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_MARKER:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)MARKER_FIELD_KIND;
            }
            else if (!stricmp(pString, "FLAGS"))
            {
                return (int)MARKER_FIELD_FLAGS;
            }
            else if (!stricmp(pString, "TIMESTAMP"))
            {
                return (int)MARKER_FIELD_TIMESTAMP;
            }
            else if (!stricmp(pString, "ID"))
            {
                return (int)MARKER_FIELD_ID;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)MARKER_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "THREAD_ID"))
            {
                return (int)MARKER_FIELD_THREAD_ID;
            }
            else if (!stricmp(pString, "NAME"))
            {
                return (int)MARKER_FIELD_NAME;
            }
            else if (!stricmp(pString, "DOMAIN"))
            {
                return (int)MARKER_FIELD_DOMAIN;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)MARKER_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_MARKER_DATA:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)MARKER_DATA_FIELD_KIND;
            }
            else if (!stricmp(pString, "FLAGS"))
            {
                return (int)MARKER_DATA_FIELD_FLAGS;
            }
            else if (!stricmp(pString, "ID"))
            {
                return (int)MARKER_DATA_FIELD_ID;
            }
            else if (!stricmp(pString, "PAYLOAD_KIND"))
            {
                return (int)MARKER_DATA_FIELD_PAYLOAD_KIND;
            }
            else if (!stricmp(pString, "PAYLOAD"))
            {
                return (int)MARKER_DATA_FIELD_PAYLOAD;
            }
            else if (!stricmp(pString, "COLOR"))
            {
                return (int)MARKER_DATA_FIELD_COLOR;
            }
            else if (!stricmp(pString, "CATEGORY"))
            {
                return (int)MARKER_DATA_FIELD_CATEGORY;
            }
            else if (!stricmp(pString, "CUPTI_DOMAIN_ID"))
            {
                return (int)MARKER_DATA_FIELD_CUPTI_DOMAIN_ID;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)MARKER_DATA_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_OVERHEAD:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)OVERHEAD_FIELD_KIND;
            }
            else if (!stricmp(pString, "OVERHEAD_KIND"))
            {
                return (int)OVERHEAD_FIELD_OVERHEAD_KIND;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)OVERHEAD_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "THREAD_ID"))
            {
                return (int)OVERHEAD_FIELD_THREAD_ID;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)OVERHEAD_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)OVERHEAD_FIELD_END;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)OVERHEAD_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "OVERHEAD_DATA"))
            {
                return (int)OVERHEAD_FIELD_OVERHEAD_DATA;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)OVERHEAD_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_MEMCPY2:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)MEMCPY2_FIELD_KIND;
            }
            else if (!stricmp(pString, "COPY_KIND"))
            {
                return (int)MEMCPY2_FIELD_COPY_KIND;
            }
            else if (!stricmp(pString, "SRC_KIND"))
            {
                return (int)MEMCPY2_FIELD_SRC_KIND;
            }
            else if (!stricmp(pString, "DST_KIND"))
            {
                return (int)MEMCPY2_FIELD_DST_KIND;
            }
            else if (!stricmp(pString, "FLAGS"))
            {
                return (int)MEMCPY2_FIELD_FLAGS;
            }
            else if (!stricmp(pString, "BYTES"))
            {
                return (int)MEMCPY2_FIELD_BYTES;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)MEMCPY2_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)MEMCPY2_FIELD_END;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)MEMCPY2_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)MEMCPY2_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)MEMCPY2_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "SRC_DEVICE_ID"))
            {
                return (int)MEMCPY2_FIELD_SRC_DEVICE_ID;
            }
            else if (!stricmp(pString, "SRC_CONTEXT_ID"))
            {
                return (int)MEMCPY2_FIELD_SRC_CONTEXT_ID;
            }
            else if (!stricmp(pString, "DST_DEVICE_ID"))
            {
                return (int)MEMCPY2_FIELD_DST_DEVICE_ID;
            }
            else if (!stricmp(pString, "DST_CONTEXT_ID"))
            {
                return (int)MEMCPY2_FIELD_DST_CONTEXT_ID;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)MEMCPY2_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "GRAPH_NODE_ID"))
            {
                return (int)MEMCPY2_FIELD_GRAPH_NODE_ID;
            }
            else if (!stricmp(pString, "GRAPH_ID"))
            {
                return (int)MEMCPY2_FIELD_GRAPH_ID;
            }
            else if (!stricmp(pString, "CHANNEL_ID"))
            {
                return (int)MEMCPY2_FIELD_CHANNEL_ID;
            }
            else if (!stricmp(pString, "CHANNEL_TYPE"))
            {
                return (int)MEMCPY2_FIELD_CHANNEL_TYPE;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)MEMCPY2_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)UVM_COUNTER_FIELD_KIND;
            }
            else if (!stricmp(pString, "COUNTER_KIND"))
            {
                return (int)UVM_COUNTER_FIELD_COUNTER_KIND;
            }
            else if (!stricmp(pString, "VALUE"))
            {
                return (int)UVM_COUNTER_FIELD_VALUE;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)UVM_COUNTER_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)UVM_COUNTER_FIELD_END;
            }
            else if (!stricmp(pString, "ADDRESS"))
            {
                return (int)UVM_COUNTER_FIELD_ADDRESS;
            }
            else if (!stricmp(pString, "SRC_ID"))
            {
                return (int)UVM_COUNTER_FIELD_SRC_ID;
            }
            else if (!stricmp(pString, "DST_ID"))
            {
                return (int)UVM_COUNTER_FIELD_DST_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)UVM_COUNTER_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)UVM_COUNTER_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "FLAGS"))
            {
                return (int)UVM_COUNTER_FIELD_FLAGS;
            }
            else if (!stricmp(pString, "PROCESSORS"))
            {
                return (int)UVM_COUNTER_FIELD_PROCESSORS;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)UVM_COUNTER_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_CUDA_EVENT:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)CUDA_EVENT_FIELD_KIND;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)CUDA_EVENT_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)CUDA_EVENT_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)CUDA_EVENT_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "EVENT_ID"))
            {
                return (int)CUDA_EVENT_FIELD_EVENT_ID;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)CUDA_EVENT_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "DEVICE_TIMESTAMP"))
            {
                return (int)CUDA_EVENT_FIELD_DEVICE_TIMESTAMP;
            }
            else if (!stricmp(pString, "CUDA_EVENT_SYNC_ID"))
            {
                return (int)CUDA_EVENT_FIELD_CUDA_EVENT_SYNC_ID;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)CUDA_EVENT_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_STREAM:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)STREAM_FIELD_KIND;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)STREAM_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)STREAM_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "PRIORITY"))
            {
                return (int)STREAM_FIELD_PRIORITY;
            }
            else if (!stricmp(pString, "FLAG"))
            {
                return (int)STREAM_FIELD_FLAG;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)STREAM_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)STREAM_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_SYNCHRONIZATION:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)SYNCHRONIZATION_FIELD_KIND;
            }
            else if (!stricmp(pString, "TYPE"))
            {
                return (int)SYNCHRONIZATION_FIELD_TYPE;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)SYNCHRONIZATION_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)SYNCHRONIZATION_FIELD_END;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)SYNCHRONIZATION_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)SYNCHRONIZATION_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)SYNCHRONIZATION_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "CUDA_EVENT_ID"))
            {
                return (int)SYNCHRONIZATION_FIELD_CUDA_EVENT_ID;
            }
            else if (!stricmp(pString, "CUDA_EVENT_SYNC_ID"))
            {
                return (int)SYNCHRONIZATION_FIELD_CUDA_EVENT_SYNC_ID;
            }
            else if (!stricmp(pString, "RETURN_VALUE"))
            {
                return (int)SYNCHRONIZATION_FIELD_RETURN_VALUE;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)SYNCHRONIZATION_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_EXTERNAL_CORRELATION:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)EXTERNAL_CORRELATION_FIELD_KIND;
            }
            else if (!stricmp(pString, "EXTERNAL_KIND"))
            {
                return (int)EXTERNAL_CORRELATION_FIELD_EXTERNAL_KIND;
            }
            else if (!stricmp(pString, "EXTERNAL_ID"))
            {
                return (int)EXTERNAL_CORRELATION_FIELD_EXTERNAL_ID;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)EXTERNAL_CORRELATION_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)EXTERNAL_CORRELATION_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_MEMORY2:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)MEMORY_FIELD_KIND;
            }
            else if (!stricmp(pString, "OPERATION_TYPE"))
            {
                return (int)MEMORY_FIELD_OPERATION_TYPE;
            }
            else if (!stricmp(pString, "MEMORY_KIND"))
            {
                return (int)MEMORY_FIELD_MEMORY_KIND;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)MEMORY_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "ADDRESS"))
            {
                return (int)MEMORY_FIELD_ADDRESS;
            }
            else if (!stricmp(pString, "BYTES"))
            {
                return (int)MEMORY_FIELD_BYTES;
            }
            else if (!stricmp(pString, "TIMESTAMP"))
            {
                return (int)MEMORY_FIELD_TIMESTAMP;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)MEMORY_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)MEMORY_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)MEMORY_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)MEMORY_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "IS_ASYNC"))
            {
                return (int)MEMORY_FIELD_IS_ASYNC;
            }
            else if (!stricmp(pString, "POOL_TYPE"))
            {
                return (int)MEMORY_FIELD_POOL_TYPE;
            }
            else if (!stricmp(pString, "POOL_ADDRESS"))
            {
                return (int)MEMORY_FIELD_POOL_ADDRESS;
            }
            else if (!stricmp(pString, "POOL_RELEASE_THRESHOLD"))
            {
                return (int)MEMORY_FIELD_POOL_RELEASE_THRESHOLD;
            }
            else if (!stricmp(pString, "POOL_SIZE"))
            {
                return (int)MEMORY_FIELD_POOL_SIZE;
            }
            else if (!stricmp(pString, "POOL_PROCESS_ID"))
            {
                return (int)MEMORY_FIELD_POOL_PROCESS_ID;
            }
            else if (!stricmp(pString, "POOL_UTILIZED_SIZE"))
            {
                return (int)MEMORY_FIELD_POOL_UTILIZED_SIZE;
            }
            else if (!stricmp(pString, "SOURCE"))
            {
                return (int)MEMORY_FIELD_SOURCE;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)MEMORY_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_MEMORY_POOL:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)MEMORY_POOL_FIELD_KIND;
            }
            else if (!stricmp(pString, "OPERATION_TYPE"))
            {
                return (int)MEMORY_POOL_FIELD_OPERATION_TYPE;
            }
            else if (!stricmp(pString, "POOL_TYPE"))
            {
                return (int)MEMORY_POOL_FIELD_POOL_TYPE;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)MEMORY_POOL_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)MEMORY_POOL_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)MEMORY_POOL_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "MIN_BYTES_TO_KEEP"))
            {
                return (int)MEMORY_POOL_FIELD_MIN_BYTES_TO_KEEP;
            }
            else if (!stricmp(pString, "ADDRESS"))
            {
                return (int)MEMORY_POOL_FIELD_ADDRESS;
            }
            else if (!stricmp(pString, "SIZE"))
            {
                return (int)MEMORY_POOL_FIELD_SIZE;
            }
            else if (!stricmp(pString, "RELEASE_THRESHOLD"))
            {
                return (int)MEMORY_POOL_FIELD_RELEASE_THRESHOLD;
            }
            else if (!stricmp(pString, "TIMESTAMP"))
            {
                return (int)MEMORY_POOL_FIELD_TIMESTAMP;
            }
            else if (!stricmp(pString, "UTILIZED_SIZE"))
            {
                return (int)MEMORY_POOL_FIELD_UTILIZED_SIZE;
            }
            else if (!stricmp(pString, "IS_MANAGED_POOL"))
            {
                return (int)MEMORY_POOL_FIELD_IS_MANAGED_POOL;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)MEMORY_POOL_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_GRAPH_TRACE:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)GRAPH_TRACE_FIELD_KIND;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)GRAPH_TRACE_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)GRAPH_TRACE_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)GRAPH_TRACE_FIELD_END;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)GRAPH_TRACE_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "GRAPH_ID"))
            {
                return (int)GRAPH_TRACE_FIELD_GRAPH_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)GRAPH_TRACE_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)GRAPH_TRACE_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "END_DEVICE_ID"))
            {
                return (int)GRAPH_TRACE_FIELD_END_DEVICE_ID;
            }
            else if (!stricmp(pString, "END_CONTEXT_ID"))
            {
                return (int)GRAPH_TRACE_FIELD_END_CONTEXT_ID;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)GRAPH_TRACE_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_JIT:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)JIT_FIELD_KIND;
            }
            else if (!stricmp(pString, "ENTRY_TYPE"))
            {
                return (int)JIT_FIELD_ENTRY_TYPE;
            }
            else if (!stricmp(pString, "OPERATION_TYPE"))
            {
                return (int)JIT_FIELD_OPERATION_TYPE;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)JIT_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)JIT_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)JIT_FIELD_END;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)JIT_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "OPERATION_CORRELATION_ID"))
            {
                return (int)JIT_FIELD_OPERATION_CORRELATION_ID;
            }
            else if (!stricmp(pString, "CACHE_SIZE"))
            {
                return (int)JIT_FIELD_CACHE_SIZE;
            }
            else if (!stricmp(pString, "CACHE_PATH"))
            {
                return (int)JIT_FIELD_CACHE_PATH;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)JIT_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "THREAD_ID"))
            {
                return (int)JIT_FIELD_THREAD_ID;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)JIT_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_DEVICE_GRAPH_TRACE:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_KIND;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_END;
            }
            else if (!stricmp(pString, "GRAPH_ID"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_GRAPH_ID;
            }
            else if (!stricmp(pString, "LAUNCHER_GRAPH_ID"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_LAUNCHER_GRAPH_ID;
            }
            else if (!stricmp(pString, "DEVICE_LAUNCH_MODE"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_DEVICE_LAUNCH_MODE;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)DEVICE_GRAPH_TRACE_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_MEM_DECOMPRESS:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)MEM_DECOMPRESS_FIELD_KIND;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)MEM_DECOMPRESS_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)MEM_DECOMPRESS_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)MEM_DECOMPRESS_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "CHANNEL_ID"))
            {
                return (int)MEM_DECOMPRESS_FIELD_CHANNEL_ID;
            }
            else if (!stricmp(pString, "CHANNEL_TYPE"))
            {
                return (int)MEM_DECOMPRESS_FIELD_CHANNEL_TYPE;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)MEM_DECOMPRESS_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "NUMBER_OF_OPERATIONS"))
            {
                return (int)MEM_DECOMPRESS_FIELD_NUMBER_OF_OPERATIONS;
            }
            else if (!stricmp(pString, "SOURCE_BYTES"))
            {
                return (int)MEM_DECOMPRESS_FIELD_SOURCE_BYTES;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)MEM_DECOMPRESS_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)MEM_DECOMPRESS_FIELD_END;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)MEM_DECOMPRESS_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_CONFIDENTIAL_COMPUTE_ROTATION:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)CONFIDENTIAL_COMPUTE_ROTATION_FIELD_KIND;
            }
            else if (!stricmp(pString, "EVENT_TYPE"))
            {
                return (int)CONFIDENTIAL_COMPUTE_ROTATION_FIELD_EVENT_TYPE;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)CONFIDENTIAL_COMPUTE_ROTATION_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)CONFIDENTIAL_COMPUTE_ROTATION_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "CHANNEL_ID"))
            {
                return (int)CONFIDENTIAL_COMPUTE_ROTATION_FIELD_CHANNEL_ID;
            }
            else if (!stricmp(pString, "CHANNEL_TYPE"))
            {
                return (int)CONFIDENTIAL_COMPUTE_ROTATION_FIELD_CHANNEL_TYPE;
            }
            else if (!stricmp(pString, "TIMESTAMP"))
            {
                return (int)CONFIDENTIAL_COMPUTE_ROTATION_FIELD_TIMESTAMP;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)CONFIDENTIAL_COMPUTE_ROTATION_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_GRAPH_HOST_NODE:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_KIND;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "GRAPH_ID"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_GRAPH_ID;
            }
            else if (!stricmp(pString, "GRAPH_NODE_ID"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_GRAPH_NODE_ID;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "THREAD_ID"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_THREAD_ID;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_END;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)GRAPH_HOST_NODE_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_COMPUTE_ENGINE_CTX_SWITCH:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)COMPUTE_ENGINE_CTX_SWITCH_FIELD_KIND;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)COMPUTE_ENGINE_CTX_SWITCH_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "TIMESTAMP"))
            {
                return (int)COMPUTE_ENGINE_CTX_SWITCH_FIELD_TIMESTAMP;
            }
            else if (!stricmp(pString, "OPERATION_TYPE"))
            {
                return (int)COMPUTE_ENGINE_CTX_SWITCH_FIELD_OPERATION_TYPE;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)COMPUTE_ENGINE_CTX_SWITCH_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_HOST_LAUNCH:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)HOST_LAUNCH_FIELD_KIND;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)HOST_LAUNCH_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)HOST_LAUNCH_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)HOST_LAUNCH_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)HOST_LAUNCH_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)HOST_LAUNCH_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "THREAD_ID"))
            {
                return (int)HOST_LAUNCH_FIELD_THREAD_ID;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)HOST_LAUNCH_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)HOST_LAUNCH_FIELD_END;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)HOST_LAUNCH_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_GREEN_CONTEXT:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)GREEN_CONTEXT_FIELD_KIND;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)GREEN_CONTEXT_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "PARENT_CONTEXT_ID"))
            {
                return (int)GREEN_CONTEXT_FIELD_PARENT_CONTEXT_ID;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)GREEN_CONTEXT_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "NUM_MULTIPROCESSORS"))
            {
                return (int)GREEN_CONTEXT_FIELD_NUM_MULTIPROCESSORS;
            }
            else if (!stricmp(pString, "NUM_TPCS"))
            {
                return (int)GREEN_CONTEXT_FIELD_NUM_TPCS;
            }
            else if (!stricmp(pString, "LOGICAL_TPC_MASK_SIZE"))
            {
                return (int)GREEN_CONTEXT_FIELD_LOGICAL_TPC_MASK_SIZE;
            }
            else if (!stricmp(pString, "LOGICAL_TPC_MASK"))
            {
                return (int)GREEN_CONTEXT_FIELD_LOGICAL_TPC_MASK;
            }
            else if (!stricmp(pString, "WORKQUEUE_RESOURCE_ID"))
            {
                return (int)GREEN_CONTEXT_FIELD_WORKQUEUE_RESOURCE_ID;
            }
            else if (!stricmp(pString, "WORKQUEUE_CONCURRENCY_LIMIT"))
            {
                return (int)GREEN_CONTEXT_FIELD_WORKQUEUE_CONCURRENCY_LIMIT;
            }
            else if (!stricmp(pString, "WORKQUEUE_SHARING_SCOPE"))
            {
                return (int)GREEN_CONTEXT_FIELD_WORKQUEUE_SHARING_SCOPE;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)GREEN_CONTEXT_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)KERNEL_FIELD_KIND;
            }
            else if (!stricmp(pString, "CACHE_CONFIG_REQUESTED"))
            {
                return (int)KERNEL_FIELD_CACHE_CONFIG_REQUESTED;
            }
            else if (!stricmp(pString, "CACHE_CONFIG_EXECUTED"))
            {
                return (int)KERNEL_FIELD_CACHE_CONFIG_EXECUTED;
            }
            else if (!stricmp(pString, "SHARED_MEMORY_CONFIG"))
            {
                return (int)KERNEL_FIELD_SHARED_MEMORY_CONFIG;
            }
            else if (!stricmp(pString, "REGISTERS_PER_THREAD"))
            {
                return (int)KERNEL_FIELD_REGISTERS_PER_THREAD;
            }
            else if (!stricmp(pString, "PARTITIONED_GLOBAL_CACHE_REQUESTED"))
            {
                return (int)KERNEL_FIELD_PARTITIONED_GLOBAL_CACHE_REQUESTED;
            }
            else if (!stricmp(pString, "PARTITIONED_GLOBAL_CACHE_EXECUTED"))
            {
                return (int)KERNEL_FIELD_PARTITIONED_GLOBAL_CACHE_EXECUTED;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)KERNEL_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)KERNEL_FIELD_END;
            }
            else if (!stricmp(pString, "COMPLETED"))
            {
                return (int)KERNEL_FIELD_COMPLETED;
            }
            else if (!stricmp(pString, "DEVICE_ID"))
            {
                return (int)KERNEL_FIELD_DEVICE_ID;
            }
            else if (!stricmp(pString, "CONTEXT_ID"))
            {
                return (int)KERNEL_FIELD_CONTEXT_ID;
            }
            else if (!stricmp(pString, "STREAM_ID"))
            {
                return (int)KERNEL_FIELD_STREAM_ID;
            }
            else if (!stricmp(pString, "GRID_X"))
            {
                return (int)KERNEL_FIELD_GRID_X;
            }
            else if (!stricmp(pString, "GRID_Y"))
            {
                return (int)KERNEL_FIELD_GRID_Y;
            }
            else if (!stricmp(pString, "GRID_Z"))
            {
                return (int)KERNEL_FIELD_GRID_Z;
            }
            else if (!stricmp(pString, "BLOCK_X"))
            {
                return (int)KERNEL_FIELD_BLOCK_X;
            }
            else if (!stricmp(pString, "BLOCK_Y"))
            {
                return (int)KERNEL_FIELD_BLOCK_Y;
            }
            else if (!stricmp(pString, "BLOCK_Z"))
            {
                return (int)KERNEL_FIELD_BLOCK_Z;
            }
            else if (!stricmp(pString, "STATIC_SHARED_MEMORY"))
            {
                return (int)KERNEL_FIELD_STATIC_SHARED_MEMORY;
            }
            else if (!stricmp(pString, "DYNAMIC_SHARED_MEMORY"))
            {
                return (int)KERNEL_FIELD_DYNAMIC_SHARED_MEMORY;
            }
            else if (!stricmp(pString, "LOCAL_MEMORY_PER_THREAD"))
            {
                return (int)KERNEL_FIELD_LOCAL_MEMORY_PER_THREAD;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)KERNEL_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "GRID_ID"))
            {
                return (int)KERNEL_FIELD_GRID_ID;
            }
            else if (!stricmp(pString, "NAME"))
            {
                return (int)KERNEL_FIELD_NAME;
            }
            else if (!stricmp(pString, "QUEUED"))
            {
                return (int)KERNEL_FIELD_QUEUED;
            }
            else if (!stricmp(pString, "SUBMITTED"))
            {
                return (int)KERNEL_FIELD_SUBMITTED;
            }
            else if (!stricmp(pString, "LAUNCH_TYPE"))
            {
                return (int)KERNEL_FIELD_LAUNCH_TYPE;
            }
            else if (!stricmp(pString, "IS_SHARED_MEMORY_CARVEOUT_REQUESTED"))
            {
                return (int)KERNEL_FIELD_IS_SHARED_MEMORY_CARVEOUT_REQUESTED;
            }
            else if (!stricmp(pString, "SHARED_MEMORY_CARVEOUT_REQUESTED"))
            {
                return (int)KERNEL_FIELD_SHARED_MEMORY_CARVEOUT_REQUESTED;
            }
            else if (!stricmp(pString, "SHARED_MEMORY_EXECUTED"))
            {
                return (int)KERNEL_FIELD_SHARED_MEMORY_EXECUTED;
            }
            else if (!stricmp(pString, "GRAPH_NODE_ID"))
            {
                return (int)KERNEL_FIELD_GRAPH_NODE_ID;
            }
            else if (!stricmp(pString, "SHMEM_LIMIT_CONFIG"))
            {
                return (int)KERNEL_FIELD_SHMEM_LIMIT_CONFIG;
            }
            else if (!stricmp(pString, "GRAPH_ID"))
            {
                return (int)KERNEL_FIELD_GRAPH_ID;
            }
            else if (!stricmp(pString, "ACCESS_POLICY_WINDOW"))
            {
                return (int)KERNEL_FIELD_ACCESS_POLICY_WINDOW;
            }
            else if (!stricmp(pString, "CHANNEL_ID"))
            {
                return (int)KERNEL_FIELD_CHANNEL_ID;
            }
            else if (!stricmp(pString, "CHANNEL_TYPE"))
            {
                return (int)KERNEL_FIELD_CHANNEL_TYPE;
            }
            else if (!stricmp(pString, "CLUSTER_X"))
            {
                return (int)KERNEL_FIELD_CLUSTER_X;
            }
            else if (!stricmp(pString, "CLUSTER_Y"))
            {
                return (int)KERNEL_FIELD_CLUSTER_Y;
            }
            else if (!stricmp(pString, "CLUSTER_Z"))
            {
                return (int)KERNEL_FIELD_CLUSTER_Z;
            }
            else if (!stricmp(pString, "CLUSTER_SCHEDULING_POLICY"))
            {
                return (int)KERNEL_FIELD_CLUSTER_SCHEDULING_POLICY;
            }
            else if (!stricmp(pString, "LOCAL_MEMORY_TOTAL"))
            {
                return (int)KERNEL_FIELD_LOCAL_MEMORY_TOTAL;
            }
            else if (!stricmp(pString, "MAX_POTENTIAL_CLUSTER_SIZE"))
            {
                return (int)KERNEL_FIELD_MAX_POTENTIAL_CLUSTER_SIZE;
            }
            else if (!stricmp(pString, "MAX_ACTIVE_CLUSTERS"))
            {
                return (int)KERNEL_FIELD_MAX_ACTIVE_CLUSTERS;
            }
            else if (!stricmp(pString, "IS_DEVICE_LAUNCHED"))
            {
                return (int)KERNEL_FIELD_IS_DEVICE_LAUNCHED;
            }
            else if (!stricmp(pString, "LAUNCH_PRIORITY"))
            {
                return (int)KERNEL_FIELD_LAUNCH_PRIORITY;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)KERNEL_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_RUNTIME:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)API_FIELD_KIND;
            }
            else if (!stricmp(pString, "CBID"))
            {
                return (int)API_FIELD_CBID;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)API_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)API_FIELD_END;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)API_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "THREAD_ID"))
            {
                return (int)API_FIELD_THREAD_ID;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)API_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "RETURN_VALUE"))
            {
                return (int)API_FIELD_RETURN_VALUE;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)API_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        case CUPTI_ACTIVITY_KIND_INTERNAL_LAUNCH_API:
        {
            if (!stricmp(pString, "KIND"))
            {
                return (int)API_FIELD_KIND;
            }
            else if (!stricmp(pString, "CBID"))
            {
                return (int)API_FIELD_CBID;
            }
            else if (!stricmp(pString, "START"))
            {
                return (int)API_FIELD_START;
            }
            else if (!stricmp(pString, "END"))
            {
                return (int)API_FIELD_END;
            }
            else if (!stricmp(pString, "PROCESS_ID"))
            {
                return (int)API_FIELD_PROCESS_ID;
            }
            else if (!stricmp(pString, "THREAD_ID"))
            {
                return (int)API_FIELD_THREAD_ID;
            }
            else if (!stricmp(pString, "CORRELATION_ID"))
            {
                return (int)API_FIELD_CORRELATION_ID;
            }
            else if (!stricmp(pString, "RETURN_VALUE"))
            {
                return (int)API_FIELD_RETURN_VALUE;
            }
            else if (!stricmp(pString, "MAX"))
            {
                return (int)API_FIELD_MAX;
            }
            else
            {
                std::cerr << "\n\nError: Invalid field name '" << pString << "' requested in activity kind " << GetActivityKindString(kind) << std::endl << std::endl;
            }
            break;
        }
        default:
        {
            std::cerr << "\n\nError: Invalid activity kind: " << GetActivityKindString(kind) << std::endl << std::endl;
            return -1;
        }
    }

    return -1;
}

#endif // HELPER_CUPTI_ACTIVITY_ENUMS_H_