/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

// This file is a macro metaprogramming file for dealing with DType in a generic
// way.

// To use this file, #define the DTYPE macro and include the file.  The first
// argument provided is the TFRT enum name for the dtype, the second is the
// corresponding TF DataType.

// Add more dtypes as necessary.
DTYPE(UI8, DT_UINT8)
DTYPE(UI16, DT_UINT16)
DTYPE(UI32, DT_UINT32)
DTYPE(UI64, DT_UINT64)
DTYPE(I1, DT_BOOL)
DTYPE(I8, DT_INT8)
DTYPE(I16, DT_INT16)
DTYPE(I32, DT_INT32)
DTYPE(I64, DT_INT64)
DTYPE(F16, DT_HALF)
DTYPE(BF16, DT_BFLOAT16)
DTYPE(F32, DT_FLOAT)
DTYPE(F64, DT_DOUBLE)
DTYPE(String, DT_STRING)
DTYPE(Complex64, DT_COMPLEX64)
DTYPE(Complex128, DT_COMPLEX128)
DTYPE(Variant, DT_VARIANT)
DTYPE(QUI8, DT_QUINT8)
DTYPE(QUI16, DT_QUINT16)
DTYPE(QI8, DT_QINT8)
DTYPE(QI16, DT_QINT16)
DTYPE(QI32, DT_QINT32)

#undef DTYPE