Возможно, кто-нибудь пользовался данной библиотекой и знает, в чем беда (уже задавал на
stackoverflow, но пока ответ так и не нашел).
Пытаюсь использовать stencil object по Blitz++ 0.10 User Guide, однако вот такой код:
#include <blitz/array.h>
#include <blitz/array/stencil-et.h>
#include <blitz/array/stencilops.h>
#include <blitz/array/stencil-et-macros.h>
BZ_USING_NAMESPACE(blitz)
BZ_DECLARE_STENCIL2(test,A,B)
B = Laplacian3D(A);
BZ_END_STENCIL
int main(int argc, const char *argv[])
{
Array<long double, 3> A(2, 2, 2), B(2, 2, 2);
applyStencil(test(), A, B);
return 0;
}
при компиляции выдает следуещее
test.cpp: In static member function ‘static void test::apply(T1&, T2&, T3, T4, T5, T6, T7, T8, T9, T10, T11) [with T1 = blitz::FastArrayIterator<long double, 3>, T2 = blitz::FastArrayIterator<long double, 3>, T3 = blitz::dummy<double>, T4 = blitz::dummy<double>, T5 = blitz::dummy<double>, T6 = blitz::dummy<double>, T7 = blitz::dummy<double>, T8 = blitz::dummy<double>, T9 = blitz::dummy<double>, T10 = blitz::dummy<double>, T11 = blitz::dummy<double>]’:
blitz/include/blitz/array/stencils.cc:288:13: instantiated from ‘void blitz::applyStencil_imp(const T_stencil&, blitz::Array<T_numtype1, 3>&, T_array2&, T_array3&, T_array4&, T_array5&, T_array6&, T_array7&, T_array8&, T_array9&, T_array10&, T_array11&) [with T_stencil = test, T_numtype1 = long double, T_array2 = blitz::Array<long double, 3>, T_array3 = blitz::dummyArray, T_array4 = blitz::dummyArray, T_array5 = blitz::dummyArray, T_array6 = blitz::dummyArray, T_array7 = blitz::dummyArray, T_array8 = blitz::dummyArray, T_array9 = blitz::dummyArray, T_array10 = blitz::dummyArray, T_array11 = blitz::dummyArray]’
itz/include/blitz/array/stencils.cc:515:5: instantiated from ‘void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&) [with T_stencil▽= test, T_numtype1 = long double, int N_rank = 3, T_array2 = blitz::Array<long double, 3>]’
test.cpp:15:30: instantiated from here
test.cpp:9:5: error: no matching function for call to ‘Laplacian3D(blitz::FastArrayIterator<long double, 3>&)’
test.cpp:9:5: note: candidates are:
blitz/include/blitz/array/stencil-classes.cc:15348:3: note: template<class T1> blitz::_bz_ArrayExpr<blitz::Laplacian3D_et<typename blitz::asExpr<T>::T_expr::T_range_result, typename blitz::asExpr<T>::T_expr::T_numtype> > blitz::Laplacian3D(const blitz::ETBase<T>&)
blitz/include/blitz/array/stencil-classes.cc:15356:3: note: template<class T, int N> blitz::_bz_ArrayExpr<blitz::Laplacian3D_et<typename blitz::asExpr<blitz::Array<T, N> >::T_expr::T_range_result, T> > blitz::Laplacian3D(const blitz::Array<T, N>&)
blitz/include/blitz/array/stencil-classes.cc:15361:3: note: template<class T, int N> blitz::_bz_ArrayExpr<blitz::Laplacian3D_et<typename blitz::asExpr<blitz::Array<T, N> >::T_expr::T_range_result, T> > blitz::Laplacian3D(blitz::Array<T, N>&)
In file included from blitz/include/blitz/array/stencil-et.h:398:0,
from test.cpp:2:
blitz/include/blitz/array/stencil-classes.cc: In function ‘blitz::_bz_ArrayExpr<blitz::Laplacian3D_et<typename blitz::asExpr<T>::T_expr::T_range_result, typename blitz::asExpr<T>::T_expr::T_numtype> > blitz::Laplacian3D(const blitz::ETBase<T>&) [with T1 = blitz::stencilExtent<3, long double>, typename blitz::asExpr<T>::T_expr::T_numtype = blitz::stencilExtent<3, long double>, typename blitz::asExpr<T>::T_expr::T_range_result = blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<blitz::stencilExtent<3, long double> > >]’:
test.cpp:9:5: instantiated from ‘static void test::apply(T1&, T2&, T3, T4, T5, T6, T7, T8, T9, T10, T11) [with T1 = blitz::stencilExtent<3, long double>, T2 = blitz::stencilExtent<3, long double>, T3 = blitz::dummy<double>, T4 = blitz::dummy<double>, T5 = blitz::dummy<double>, T6 = blitz::dummy<double>, T7 = blitz::dummy<double>, T8 = blitz::dummy<double>, T9 = blitz::dummy<double>, T10 = blitz::dummy<double>, T11 = blitz::dummy<double>]’
blitz/include/blitz/array/stencils.cc:113:5: instantiated from ‘void blitz::calcStencilExtent(T_extent&, const T_stencil&, const blitz::Array<T_numtype1, N_rank>&, const T_array2&, const T_array3&, const T_array4&, const T_array5&, const T_array6&, const T_array7&, const T_array8&, const T_array9&, const T_array10&, const T_array11&) [with T_extent = blitz::stencilExtent<3, long double>, int N_rank = 3, T_stencil = test, T_numtype1 = long double, T_array2 = blitz::Array<long double, 3>, T_array3 = blitz::dummyArray, T_array4 = blitz::dummyArray, T_array5 = blitz::dummyArray, T_array6 = blitz::dummyArray, T_array7 = blitz::dummyArray, T_array8 = blitz::dummyArray, T_array9 = blitz::dummyArray, T_array10 = blitz::dummyArray, T_array11 = blitz::dummyArray]’
blitz/include/blitz/array/stencils.cc:161:5: instantiated from ‘static void blitz::_getStencilExtent<hasExtents>::getStencilExtent(blitz::TinyVector<int, N_rank>&, blitz::TinyVector<int, N_rank>&, const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&, T_array5&, T_array6&, T_array7&, T_array8&, T_array9&, T_array10&, T_array11&) [with int N_rank = 3, T_stencil = test, T_numtype1 = long double, T_array2 = blitz::Array<long double, 3>, T_array3 = blitz::dummyArray, T_array4 = blitz::dummyArray, T_array5 = blitz::dummyArray, T_array6 = blitz::dummyArray, T_array7 = blitz::dummyArray, T_array8 = blitz::dummyArray, T_array9 = blitz::dummyArray, T_array10 = blitz::dummyArray, T_array11 = blitz::dummyArray, int hasExtents = 0]’
blitz/include/blitz/array/stencils.cc:195:5: instantiated from ‘void blitz::getStencilExtent(blitz::TinyVector<int, N_rank>&, blitz::TinyVector<int, N_rank>&, const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&, T_array5&, T_array6&, T_array7&, T_array8&, T_array9&, T_array10&, T_array11&) [with int N_rank = 3, T_stencil = test, T_numtype1 = long double, T_array2 = blitz::Array<long double, 3>, T_array3 = blitz::dummyArray, T_array4 = blitz::dummyArray, T_array5 = blitz::dummyArray, T_array6 = blitz::dummyArray, T_array7 = blitz::dummyArray, T_array8 = blitz::dummyArray, T_array9 = blitz::dummyArray, T_array10 = blitz::dummyArray, T_array11 = blitz::dummyArray]’
blitz/include/blitz/array/stencils.cc:216:5: instantiated from ‘void blitz::applyStencil_imp(const T_stencil&, blitz::Array<T_numtype1, 3>&, T_array2&, T_array3&, T_array4&, T_array5&, T_array6&, T_array7&, T_array8&, T_array9&, T_array10&, T_array11&) [with T_stencil = test, T_numtype1 = long double, T_array2 = blitz::Array<long double, 3>, T_array3 = blitz::dummyArray, T_array4 = blitz::dummyArray, T_array5 = blitz::dummyArray, T_array6 = blitz::dummyArray, T_array7 = blitz::dummyArray, T_array8 = blitz::dummyArray, T_array9 = blitz::dummyArray, T_array10 = blitz::dummyArray, T_array11 = blitz::dummyArray]’
blitz/include/blitz/array/stencils.cc:515:5: instantiated from ‘void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&) [with T_stencil = test, T_numtype1 = long double, int N_rank = 3, T_array2 = blitz::Array<long double, 3>]’
test.cpp:15:30: instantiated from here
blitz/include/blitz/array/stencil-classes.cc:15351:126: error: ‘const class blitz::stencilExtent<3, long double>’ has no member named ‘domain’
Собственно, я совершенно не понимаю, что же я не так делаю, и как именно вызывать этот несчастный Laplacian3D?