-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Hi, thanks for this fantastic library!
In order to make this work:
Tensor<dtype> N(n_spin, len_N);
N.fill_random(0.0,1.0);
dtype scal(0,2.*M_PI);
auto f = Endomorphism<dtype>([](dtype a){ return exp(a);});
N.scale(scal, idxi, f);
I had to apply this patch:
--- a/src/interface/tensor.cxx
+++ b/src/interface/tensor.cxx
@@ -1770,7 +1770,7 @@ NORM_INFTY_INST(double)
void Tensor<dtype>::scale(dtype alpha,
const char * idx_A,
Endomorphism<dtype> fseq){
- CTF_int::scaling scl = CTF_int::scaling(this, idx_A, &fseq, (char const *)&alpha);
+ CTF_int::scaling scl = CTF_int::scaling(this, idx_A, (char const *)&alpha, &fseq);
scl.execute();
}
Is this a bug or I'm using it wrong?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels