chromium/third_party/tflite/src/tensorflow/lite/kernels/matrix_set_diag.cc

/* Copyright 2019 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.
==============================================================================*/
#include <stdint.h>

#include "tensorflow/lite/core/c/common.h"
#include "tensorflow/lite/kernels/internal/optimized/optimized_ops.h"
#include "tensorflow/lite/kernels/internal/reference/reference_ops.h"
#include "tensorflow/lite/kernels/internal/tensor.h"
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
#include "tensorflow/lite/kernels/kernel_util.h"

namespace tflite {
namespace ops {
namespace builtin {
namespace matrix_set_diag {

constexpr int kInputTensor =;
constexpr int kDiagonalTensor =;
constexpr int kOutputTensor =;

TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {}

// Fill the tensor to make a diagonal matrix in each batch, i.e., when
// row index and column index are the same, fill with the next diagonal value.
// All other entries are the same as the input value.
// TODO(b/128636574) Move to reference_ops.
template <typename T>
void FillDiagImpl(const T* in, const T* diag, T* out, const int batch_size,
                  const int row_size, const int col_size) {}

template <typename T>
void FillDiag(const TfLiteTensor* input, const TfLiteTensor* diag,
              TfLiteTensor* output, const int batch_size, const int row_size,
              const int col_size) {}

// Fill a tensor with given "diag" values on the diagonal, input values
// elsewhere.
void FillDiagHelper(const TfLiteTensor* input, const TfLiteTensor* diag,
                    TfLiteTensor* output) {}

TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {}

}  // namespace matrix_set_diag

TfLiteRegistration* Register_MATRIX_SET_DIAG() {}

}  // namespace builtin
}  // namespace ops
}  // namespace tflite