diff --git a/src/ngraph_utils.cc b/src/ngraph_utils.cc index e57f55e3..0d28267a 100644 --- a/src/ngraph_utils.cc +++ b/src/ngraph_utils.cc @@ -176,43 +176,49 @@ void print_node_histogram(const std::unordered_map& histogram, } const gtl::ArraySlice& NGraphDTypes() { - static gtl::ArraySlice result{ + static std::vector vector{ DT_FLOAT, DT_DOUBLE, DT_INT8, DT_INT16, DT_INT32, DT_INT64, DT_UINT8, DT_UINT16, DT_UINT32, DT_UINT64, DT_BOOL, DT_QINT8, DT_QUINT8}; + static gtl::ArraySlice result{vector}; return result; } const gtl::ArraySlice& NGraphNumericDTypes() { - static gtl::ArraySlice result{ - DT_FLOAT, DT_DOUBLE, DT_INT8, DT_INT16, DT_INT32, - DT_INT64, DT_UINT8, DT_UINT16, DT_UINT32, DT_UINT64}; + static std::vector vector{DT_FLOAT, DT_DOUBLE, DT_INT8, DT_INT16, + DT_INT32, DT_INT64, DT_UINT8, DT_UINT16, DT_UINT32, DT_UINT64}; + static gtl::ArraySlice result{vector}; return result; } const gtl::ArraySlice& NGraphNumericAndQuantizedDTypes() { - static gtl::ArraySlice result{ + static std::vector vector{ DT_FLOAT, DT_DOUBLE, DT_INT8, DT_INT16, DT_INT32, DT_INT64, DT_UINT8, DT_UINT16, DT_UINT32, DT_UINT64, DT_QINT8, DT_QUINT8}; + static gtl::ArraySlice result{vector}; return result; } const gtl::ArraySlice& NGraphIndexDTypes() { - static gtl::ArraySlice result{DT_INT32, DT_INT64}; + static std::vector vector{DT_INT32, DT_INT64}; + static gtl::ArraySlice result{vector}; return result; } const gtl::ArraySlice& NGraphSupportedQuantizedDTypes() { - static gtl::ArraySlice result{DT_QINT8, DT_QUINT8}; + static std::vector vector{DT_QINT8, DT_QUINT8}; + static gtl::ArraySlice result{vector}; return result; } const gtl::ArraySlice& NGraphRealDTypes() { - static gtl::ArraySlice result{DT_FLOAT, DT_DOUBLE}; + static std::vector vector{DT_FLOAT, DT_DOUBLE}; + static gtl::ArraySlice result{vector}; return result; } const gtl::ArraySlice& NGraphBiasDTypes() { - static gtl::ArraySlice result{DT_FLOAT, DT_QINT32}; + static std::vector vector{DT_FLOAT, DT_QINT32}; + static gtl::ArraySlice result{vector}; return result; }