Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEMM for TensorMap does not compile #83

Open
wavefunction91 opened this issue May 12, 2016 · 0 comments
Open

GEMM for TensorMap does not compile #83

wavefunction91 opened this issue May 12, 2016 · 0 comments

Comments

@wavefunction91
Copy link
Contributor

The following snippet does not compile

#include <iostream>
#include <btas/btas.h>


typedef btas::RangeNd<CblasColMajor> RangeColMajor; 
int main() {
  std::vector<double> data(10);
  std::vector<double> data2(10);
  std::fill_n(data.begin(),10,0.0);
  std::fill_n(data2.begin(),10,0.0);

  auto map = btas::make_map(&data[0],RangeColMajor{5,5,1});
  auto map2 = btas::make_map(&data[0],RangeColMajor{5,5,1});
  auto map3 = btas::make_map(&data2[0],RangeColMajor{5,5});
  contract(1.0,map,{1,2,3},map2,{4,2,3},0.0,map3,{1,4});
  return 0;

};

The following errors are given with GCC 5.3.0

BTAS/btas/generic/contract.h:155:7: error: ‘class btas::TensorView<double, btas::RangeNd<(CBLAS_ORDER)1u>, btas::infinite_sequence_adaptor<double*, void>, btas::TensorViewPolicy<> >’ has no member named ‘resize’
       C.resize(__zero_shape);
BTAS/btas/tensorview.h:172:20: error: use of deleted function ‘btas::detail::bool_type<true>& btas::detail::bool_type<true>::operator=(const btas::detail::bool_type<true>&)’
         can_write_ = x.can_write_;
BTAS/btas/util/sequence_adaptor.h:80:35: error: invalid static_cast from type ‘const std::reference_wrapper<btas::infinite_sequence_adaptor<double*, void> >’ to type ‘std::reference_wrapper<btas::infinite_sequence_adaptor<double*, void> >::type& {aka btas::infinite_sequence_adaptor<double*, void>&}’
         static_cast<type&>(*this) = static_cast<type&>(x);

followed by repeats of some combination of these errors at other parts of BTAS. Creating the TensorMaps compiles without problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant