/* 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, and the second is the
// corresponding tensorflow::DataType.

// Add more dtypes as necessary.
DTYPE(I1, DT_BOOL)
DTYPE(I8, DT_INT8)
DTYPE(I16, DT_INT16)
DTYPE(I32, DT_INT32)
DTYPE(I64, DT_INT64)
DTYPE(UI8, DT_UINT8)
DTYPE(UI16, DT_UINT16)
DTYPE(UI32, DT_UINT32)
DTYPE(UI64, DT_UINT64)
DTYPE(BF16, DT_BFLOAT16)
DTYPE(F16, DT_HALF)
DTYPE(F32, DT_FLOAT)
DTYPE(F64, DT_DOUBLE)
DTYPE(Complex64, DT_COMPLEX64)
DTYPE(Complex128, DT_COMPLEX128)
DTYPE(String, DT_STRING)
DTYPE(Resource, DT_RESOURCE)
DTYPE(Variant, DT_VARIANT)
#undef DTYPE
