Skip to content

Instantly share code, notes, and snippets.

@killeent
Created July 12, 2017 23:59
Show Gist options
  • Save killeent/ed623914303c23d8b88a184912712ee4 to your computer and use it in GitHub Desktop.
Save killeent/ed623914303c23d8b88a184912712ee4 to your computer and use it in GitHub Desktop.
Tensor & CPUByteType::cat_out(TensorList tensors, int dim, Tensor & self) {
auto self_ = checked_cast<CPUByteTensor>(self.pImpl,"self",0);
auto tensors_ = tensor_list_checked_cast<CPUByteTensor, Tensor, THByteTensor>(tensors,"tensors",1);
THByteTensor_catArray(self_->tensor, tensors_.data(), tensors_.size(), dim);
return self;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment