summaryrefslogtreecommitdiff
path: root/Codes/flownet2/src/ops/flow_warp/flow_warp.h
blob: 2780316aa0cf8e840534db9abd8759eec6c0dfe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef FLOWNET_FLOWWARP_H_
#define FLOWNET_FLOWWARP_H_

#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/platform/types.h"

#define FW_THREADS 32
#define FW_TILE_X FW_THREADS
#define FW_TILE_C FW_THREADS

namespace tensorflow {
typedef Eigen::GpuDevice GPUDevice;

void FlowWarp(const GPUDevice& device,
              typename TTypes<float, 4>::ConstTensor input,
              typename TTypes<float, 4>::ConstTensor flow,
              typename TTypes<float, 4>::Tensor output);

void FlowWarpGrad(const GPUDevice& device,
                  typename TTypes<float, 4>::ConstTensor image,
                  typename TTypes<float, 4>::ConstTensor flow,
                  typename TTypes<float, 4>::ConstTensor gradient,
                  typename TTypes<float, 4>::Tensor image_grad,
                  typename TTypes<float, 4>::Tensor flow_grad);
} // end namespace tensorflow

#endif  // FLOWNET_FLOWWARP_H_