test: run-reference run-logtest run-tensor
-reference: reference.go
- $(CXX) $(CXXFLAGS) -o $@ $^ $D/base/lib/libbase.g.a
+reference: reference.go -lbase.g
+ $(CXX) $(CXXFLAGS) -o $@ $^
run-reference: reference
-./reference
-logtest: logtest.go
- $(CXX) $(CXXFLAGS) -o $@ $^ $D/base/lib/libbase.g.a
+logtest: logtest.go -lbase.g
+ $(CXX) $(CXXFLAGS) -o $@ $^
run-logtest: logtest
-./logtest
-tensor: tensor.go
- $(CXX) $(CXXFLAGS) -o $@ $^ $D/base/lib/libbase.g.a
+tensor: tensor.go -lbase.g -llac.g
+ $(CXX) $(CXXFLAGS) -o $@ $^
run-tensor: tensor
-./tensor
#include <base/tensor.h>
+#include <lac/vector.h>
#include <iostream>
Tensor<2,dim> tt;
Tensor<2,dim> result(b);
+ Vector<double> unrolled(9);
+
+ t.unroll(unrolled);
+ cout << "unrolled:";
+ for (unsigned i=0;i<9;i++)
+ cout << ' ' << unrolled(i);
+ cout << endl;
+
cout << "t=" << endl;
for (unsigned int i=0; i<dim; ++i)
{
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams