| 146 | values_out_(values_out) {} |
| 147 | |
| 148 | void Update(const int64 batch_index, const int64 cross_count, |
| 149 | const OutType& cross) const { |
| 150 | const int64 output_index = output_start_indices_[batch_index] + cross_count; |
| 151 | |
| 152 | auto indices_matrix = indices_out_->matrix<int64>(); |
| 153 | indices_matrix(output_index, 0) = batch_index; |
| 154 | indices_matrix(output_index, 1) = cross_count; |
| 155 | |
| 156 | auto value_vec = values_out_->vec<OutType>(); |
| 157 | value_vec(output_index) = cross; |
| 158 | } |
| 159 | |
| 160 | private: |
| 161 | const std::vector<int64>& output_start_indices_; |