Skip to content

Commit

Permalink
[Mask R-CNN]Add Int8 AABB Generate proposals Op
Browse files Browse the repository at this point in the history
Summary: Adds support for additional Eigen Utils for custom type defs.

Reviewed By: vkuzo

Differential Revision: D23898398

fbshipit-source-id: fb5f6d6ed8a56e6244f4f0cb419140b365ff7a82
  • Loading branch information
anshuljain1 authored and facebook-github-bot committed Dec 4, 2020
1 parent ba3962f commit 714c702
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions caffe2/utils/eigen_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ using EArrXb = EArrXt<bool>;
using EArrXI32 = EArrXt<int32_t>;
using EArrXU16 = EArrXt<uint16_t>;
using EArrXU8 = EArrXt<uint8_t>;
using EArr3U8 = Eigen::Array<uint8_t, 3, 1>;

// 2-d array, column major
template <typename T>
Expand All @@ -95,6 +96,8 @@ using ERArrXXI32t = ERArrXXt<int32_t>;
using ERArrXXU16t = ERArrXXt<uint16_t>;
using ERArrXXU8t = ERArrXXt<uint8_t>;
using ERArrXXi = ERArrXXt<int>;
using ERArrXXi64t = ERArrXXt<int64_t>;
using ERArrXXi32t = ERArrXXt<int32_t>;

// 1-d vector
template <typename T>
Expand All @@ -103,21 +106,27 @@ using EVecXd = Eigen::VectorXd;
using EVecXf = Eigen::VectorXf;

// 1-d row vector
template <typename T>
using ERVecXt = Eigen::RowVector<T, Eigen::Dynamic>;
using ERVecXd = Eigen::RowVectorXd;
using ERVecXf = Eigen::RowVectorXf;
using ERVecXU8 = Eigen::RowVectorX<uint8_t>;

// 2-d matrix, column major
template <typename T>
using EMatXt = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>;
using EMatXd = Eigen::MatrixXd;
using EMatXf = Eigen::MatrixXf;
using EMatXU8 = EMatXt<uint8_t>;
using EMatXU16 = EMatXt<uint16_t>;

// 2-d matrix, row major
template <typename T>
using ERMatXt =
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
using ERMatXd = ERMatXt<double>;
using ERMatXf = ERMatXt<float>;
using ERMatXU8 = ERMatXt<uint8_t>;

namespace utils {

Expand Down

0 comments on commit 714c702

Please sign in to comment.