// Copyright (C) 2018-2026 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#include "executor.hpp"

#include <string>

namespace ov::intel_cpu {

std::string ExecutorTypeToString(const ExecutorType type) {
#define CASE(_type)           \
    case ExecutorType::_type: \
        return #_type;
    switch (type) {
        CASE(Undefined);
        CASE(Graph);
        CASE(Reference);
        CASE(Common);
        CASE(Jit);
        CASE(Dnnl);
        CASE(Acl);
        CASE(Mlas);
        CASE(Kleidiai);
    }
#undef CASE
    return "Undefined";
}

ExecutorType ExecutorTypeFromString(const std::string& typeStr) {
#define CASE(_type)                 \
    if (typeStr == #_type) {        \
        return ExecutorType::_type; \
    }
    CASE(Undefined);
    CASE(Graph);
    CASE(Reference);
    CASE(Common);
    CASE(Jit);
    CASE(Dnnl);
    CASE(Acl);
    CASE(Mlas);
    CASE(Kleidiai);
#undef CASE
    return ExecutorType::Undefined;
}

}  // namespace ov::intel_cpu
