You can subscribe to this list here.
1998 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}
(1) 
_{Jul}

_{Aug}
(15) 
_{Sep}
(5) 
_{Oct}
(11) 
_{Nov}
(19) 
_{Dec}
(5) 

1999 
_{Jan}
(8) 
_{Feb}
(2) 
_{Mar}
(13) 
_{Apr}
(22) 
_{May}
(6) 
_{Jun}
(11) 
_{Jul}
(3) 
_{Aug}
(8) 
_{Sep}
(14) 
_{Oct}
(14) 
_{Nov}
(7) 
_{Dec}
(13) 
2000 
_{Jan}
(14) 
_{Feb}
(13) 
_{Mar}
(25) 
_{Apr}
(5) 
_{May}
(11) 
_{Jun}
(7) 
_{Jul}
(5) 
_{Aug}
(4) 
_{Sep}
(1) 
_{Oct}
(14) 
_{Nov}
(13) 
_{Dec}
(15) 
2001 
_{Jan}
(46) 
_{Feb}
(8) 
_{Mar}
(10) 
_{Apr}
(4) 
_{May}
(7) 
_{Jun}
(5) 
_{Jul}
(10) 
_{Aug}
(12) 
_{Sep}
(11) 
_{Oct}
(6) 
_{Nov}
(11) 
_{Dec}
(3) 
2002 
_{Jan}
(6) 
_{Feb}
(2) 
_{Mar}
(3) 
_{Apr}
(16) 
_{May}
(23) 
_{Jun}
(9) 
_{Jul}
(14) 
_{Aug}
(15) 
_{Sep}
(11) 
_{Oct}
(13) 
_{Nov}
(15) 
_{Dec}
(36) 
2003 
_{Jan}
(33) 
_{Feb}
(49) 
_{Mar}
(27) 
_{Apr}
(23) 
_{May}
(19) 
_{Jun}
(21) 
_{Jul}
(33) 
_{Aug}
(26) 
_{Sep}
(42) 
_{Oct}
(34) 
_{Nov}
(31) 
_{Dec}
(52) 
2004 
_{Jan}
(22) 
_{Feb}
(24) 
_{Mar}
(22) 
_{Apr}
(12) 
_{May}
(18) 
_{Jun}
(45) 
_{Jul}
(18) 
_{Aug}
(52) 
_{Sep}
(13) 
_{Oct}
(17) 
_{Nov}
(14) 
_{Dec}
(30) 
2005 
_{Jan}
(11) 
_{Feb}
(10) 
_{Mar}
(19) 
_{Apr}
(29) 
_{May}
(58) 
_{Jun}
(61) 
_{Jul}
(45) 
_{Aug}
(23) 
_{Sep}
(43) 
_{Oct}
(42) 
_{Nov}
(30) 
_{Dec}
(24) 
2006 
_{Jan}
(23) 
_{Feb}
(43) 
_{Mar}
(34) 
_{Apr}
(14) 
_{May}
(31) 
_{Jun}
(23) 
_{Jul}
(13) 
_{Aug}
(6) 
_{Sep}
(16) 
_{Oct}
(14) 
_{Nov}
(9) 
_{Dec}
(11) 
2007 
_{Jan}
(28) 
_{Feb}
(24) 
_{Mar}
(23) 
_{Apr}
(16) 
_{May}
(29) 
_{Jun}
(28) 
_{Jul}
(17) 
_{Aug}
(14) 
_{Sep}
(15) 
_{Oct}
(19) 
_{Nov}

_{Dec}
(12) 
2008 
_{Jan}
(30) 
_{Feb}
(21) 
_{Mar}
(24) 
_{Apr}
(22) 
_{May}
(38) 
_{Jun}
(21) 
_{Jul}
(24) 
_{Aug}
(31) 
_{Sep}
(9) 
_{Oct}
(23) 
_{Nov}
(18) 
_{Dec}
(1) 
2009 
_{Jan}
(12) 
_{Feb}
(17) 
_{Mar}
(20) 
_{Apr}
(6) 
_{May}
(6) 
_{Jun}
(11) 
_{Jul}
(27) 
_{Aug}
(5) 
_{Sep}
(5) 
_{Oct}
(16) 
_{Nov}
(2) 
_{Dec}
(6) 
2010 
_{Jan}
(18) 
_{Feb}
(23) 
_{Mar}
(5) 
_{Apr}
(6) 
_{May}
(2) 
_{Jun}
(10) 
_{Jul}
(24) 
_{Aug}
(6) 
_{Sep}
(7) 
_{Oct}
(8) 
_{Nov}
(11) 
_{Dec}
(1) 
2011 
_{Jan}
(15) 
_{Feb}
(1) 
_{Mar}
(1) 
_{Apr}
(4) 
_{May}
(7) 
_{Jun}
(2) 
_{Jul}
(36) 
_{Aug}
(10) 
_{Sep}
(2) 
_{Oct}
(10) 
_{Nov}
(3) 
_{Dec}
(12) 
2012 
_{Jan}
(10) 
_{Feb}
(29) 
_{Mar}
(6) 
_{Apr}
(47) 
_{May}
(11) 
_{Jun}
(11) 
_{Jul}
(14) 
_{Aug}
(13) 
_{Sep}
(3) 
_{Oct}

_{Nov}
(5) 
_{Dec}

2013 
_{Jan}
(7) 
_{Feb}
(6) 
_{Mar}
(5) 
_{Apr}

_{May}
(5) 
_{Jun}
(10) 
_{Jul}

_{Aug}
(1) 
_{Sep}
(6) 
_{Oct}
(3) 
_{Nov}
(1) 
_{Dec}
(7) 
2014 
_{Jan}

_{Feb}
(5) 
_{Mar}
(1) 
_{Apr}
(2) 
_{May}

_{Jun}
(6) 
_{Jul}

_{Aug}
(10) 
_{Sep}
(1) 
_{Oct}

_{Nov}
(5) 
_{Dec}

2015 
_{Jan}

_{Feb}
(1) 
_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}
(1) 
_{Aug}

_{Sep}
(1) 
_{Oct}

_{Nov}
(1) 
_{Dec}

2016 
_{Jan}
(6) 
_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}

_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 


1
(2) 
2
(4) 
3

4
(2) 
5

6
(1) 
7
(1) 
8
(8) 
9
(1) 
10
(7) 
11
(6) 
12
(5) 
13

14
(1) 
15
(4) 
16
(2) 
17

18

19
(2) 
20
(1) 
21

22

23
(1) 
24

25

26

27

28

29

30
(2) 
31
(2) 



From: <mirko.cambi@ba...>  20031231 03:01:25

I will be out of the office starting 24122003 and will not return until 06012004. I will respond to your message when I return. This message is confidential and solely for the intended addressee(s). If you are not the intended recipient of this message, please notify the sender immediately and delete it from your system. Unauthorised reproduction, disclosure, modification and or distribution of this email is strictly prohibited. The contents of this email do not constitute a commitment by Banca di Intermediazione Mobiliare IMI S.p.A. (Banca IMI), except where expressly provided for in a written agreement between you and Banca IMI. Banca di Intermediazione Mobiliare IMI S.p.A. is an authorised Bank in Italy. Banca di Intermediazione Mobiliare IMI S.p.A., London Branch, a member of the London Stock Exchange, is regulated by the Financial Services Authority for the conduct of designated investment business in the UK 
From: Julian Cummings <cummings@ca...>  20031231 00:59:58

Hello Andrius, I don't think interlaced arrays will help you here, since you want each component stored separately in contiguous memory. If you really need the components stored separately, you should just create three separate objects of type Array<std::complex<double>,2>, one for each component. You could then interlace these arrays if there were some advantage to doing that, but I would test the performance effects carefully. You cannot have an Array of TinyVectors where the TinyVector components are not stored contiguously. If you start with an Array of TinyVectors, you would have to extract each component and assign it to a separate scalar Array to get the component data copied into contiguous memory. Regards, Julian C. Andrius Kurtinaitis wrote: > Hello, > is it possible to create multicomponent interlaced arrays in blitz? > My data point consists of three complex values. It would look like this: > TinyVector<std::complex<double>, 3> > The array would be then > Array<TinyVector<std::complex<double>, 3>, 2> >  I need twodimensional arrays. > But I would like to store the components separately by component, so > that first I have complex data arrays of the first component, then the > second and the third one. I need continuous component data for other > algorithms, such as fft and spline interpolation. > Any help will be highly appreciated. > > Andrius Kurtinaitis > > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > http://www.oonumerics.org/mailman/listinfo.cgi/blitzsupport  Dr. Julian C. Cummings Email: cummings@... California Institute of Technology Phone: 6263952543 1200 E. California Blvd., Mail Code 15879 Fax: 6265845917 Pasadena, CA 91125 
From: Manuel Gamito <mgmt69@ya...>  20031230 11:30:56

Hello, Here is a little piece of code that compiles fine with Blitz 0.6 but fails with Blitz 0.7. The compiler is gcc 3.3.2 typedef blitz::Array<int,2> IntArray; IntArray ia; IntArray::iterator it(ia); it = ia.begin(); The output of the compiler is: /usr/local/blitz/include/blitz/array/iter.h: In member function `void blitz::ConstPointerStack<P_numtype, N_rank>::operator=(const blitz::ConstPointerStack<P_numtype, N_rank>&) [with P_numtype = int, int N_rank = 2]': teste.cc:12: instantiated from here /usr/local/blitz/include/blitz/array/iter.h:40: error: ISO C++ forbids assignment of arrays I went to check the Blitz code in blitz/array/iter.h and, indeed, ArrayIterator is derived from ConstArrayIterator, which, in turn, contains two ConstPointerStack objects. The ConstPointerStack class contains an array stack_[N_rank] as a private member. ConstPointerStack defines an assignment operator which tries to copy between two arrays with the statement "stack_ = rhs.stack_" (iter.h, line 36). I wonder if the intention is just to copy the pointer to the start of the array. Does this mean that, in 0.7, it is no longer possible to use iterator assignment? manuel gamito 
From: Andrius Kurtinaitis <andrius.kurtinaitis@ma...>  20031230 11:00:41

Hello, is it possible to create multicomponent interlaced arrays in blitz? My data point consists of three complex values. It would look like this: TinyVector<std::complex<double>, 3> The array would be then Array<TinyVector<std::complex<double>, 3>, 2>  I need twodimensional arrays. But I would like to store the components separately by component, so that first I have complex data arrays of the first component, then the second and the third one. I need continuous component data for other algorithms, such as fft and spline interpolation. Any help will be highly appreciated. Andrius Kurtinaitis 
From: Kumar <surkumdev1@ya...>  20031223 09:39:52

Dear Blitz team and others, I just wanted to know if it is OK with u guys, if i hosted the modified blitz0.6, from my project site. Information about this project Project Download info http://sourceforge.net/projects/atpg/ Let me introduce myself. I am Suresh kumar Devanathan. I am one of Dr. Vishwani Agarwal(IEEE/ACM fellow) students. I have been building an c++ ATPG, that might hold your curiosity. Our research papers, for which thr project was build, currently in final stages of prepublication, can also be downloaded from http://sourceforge.net/projects/atpg/ Comments/errata report are all welcome. The initial goal of the ATPG project was to build a customizable ATPG system, that is fast and is "overhead free". Usually such systems were better built using c, than c++. Concepts like inheritance, polymorphism and others, using virtual functions, are usually unsuitable for computebound problems. However, if one uses templatebased techiques, as employed in other libraries like blitz++, one can, in fact, build a c++ system that is adaptable at every level and is still wellsuited for computebound problems. Our ATPG sytem tries to meet the following goals, 1) designed using template techniques, to allow objectoriented programing, without sacrificing efficiency. 2) STL for maintaining internal data structures 3) incorporates mathematical package blitz++ 4) extended vectorized algorithmic support for blitz++ (vtext), so that data can be analyzed on the fly. [See: http://www.oonumerics.org/MailArchives/blitzdev/msg00537.php , how these extentions are finding use, by themselves. ] thanks suresh ===== Random comment of the day "Just believe in anything, anything more than the obvious." "Are we there yet?" "The hole in his pocket lets the whole down his pocket" __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree 
From: Christopher Weed <chrisweed@ho...>  20031220 03:15:56

Hey, Whenever I try to download Blitz++ version 0.7 from Sourceforge I get the error "Could not read file." Chris ________________________________________________ Christopher A. Weed chrisweed@... _________________________________________________________________ Tired of slow downloads? Compare online deals from your local highspeed providers now. https://broadband.msn.com 
From: Julian Cummings <cummings@ca...>  20031219 22:01:02

Hi Thomas, The bizarreness with the location of libblitz.a has to do with the use of libtool to manage the building of applications with either static or shared libraries. You should probably read the GNU libtool manual to get an idea of how this is supposed to work. When you compile the blitz testsuite and example codes, you will notice the use of libtool to handle the linking. Personally, I feel that using libtool for a package with a very tiny library like blitz is overkill. But there was much shrieking when I floated the idea of abandoning it. I guess a lot of Linux users are very comfortable with using libtool along with autoconf/automake to build and install software packages. So as long as it doesn't get in the way, I don't mind. (Someone else may want to chime in here on why libtool is useful.) As for the purpose of the library, it holds instances of some global objects, such as the predefined tensor indices in namespace blitz::tensor. Regards, Julian C. Thomas Wharton wrote: >Greetings, > >Kinda new with installing software on my Linux system and I ran into >something while installing Blitz that I thought I should ask about... > >After installing Blitz, I noticed that the /lib directory contained the file >libblitz.la but not libblitz.a  the libblitz.a file is actually located in >a subdir called ".libs". > >I received an ld error ("cannot find lblitz") when following the >instructions for linking the Blitz library. However, noting where libblitz.a >actually is on my system, I modified the command to specify the ".libs" dir. >This appears to work; however, the readme.txt file in the /lib dir says the >libblitz.a should reside in this dir. > >Are the docs wrong? Is it OK for the libblitz.a to reside in a subdir of >/lib called ".libs"? Just to specify, I am running Red Hat 9.0 (dont know >if that matters). > >Also curious of why you actually need to link in a library, since Blitz is >template based  admittedly, I am new to templates too, so I basically just >nod my head and follow the instructions to the letter :) > >Many Thanks, >Thomas Wharton >Software Engineer >Raytheon Co. >7574218794 > >_______________________________________________ >Blitzsupport mailing list >Blitzsupport@... >http://www.oonumerics.org/mailman/listinfo.cgi/blitzsupport > >  Dr. Julian C. Cummings Email: cummings@... California Institute of Technology Phone: 6263952543 1200 E. California Blvd., Mail Code 15879 Fax: 6265845917 Pasadena, CA 91125 
From: Thomas Wharton <thomas_wharton@ro...>  20031219 17:11:27

Greetings, Kinda new with installing software on my Linux system and I ran into something while installing Blitz that I thought I should ask about... After installing Blitz, I noticed that the /lib directory contained the file libblitz.la but not libblitz.a  the libblitz.a file is actually located in a subdir called ".libs". I received an ld error ("cannot find lblitz") when following the instructions for linking the Blitz library. However, noting where libblitz.a actually is on my system, I modified the command to specify the ".libs" dir. This appears to work; however, the readme.txt file in the /lib dir says the libblitz.a should reside in this dir. Are the docs wrong? Is it OK for the libblitz.a to reside in a subdir of /lib called ".libs"? Just to specify, I am running Red Hat 9.0 (dont know if that matters). Also curious of why you actually need to link in a library, since Blitz is template based  admittedly, I am new to templates too, so I basically just nod my head and follow the instructions to the letter :) Many Thanks, Thomas Wharton Software Engineer Raytheon Co. 7574218794 
From: Andrius Kurtinaitis <andrius.kurtinaitis@ma...>  20031216 10:36:59

Thanks, no warnings now. Works also fine. Andrius Julian C. Cummings wrote: > Hello Andrius, > > I owe you an apology. My explanation of the error message was correct, but > I didn't realize that the error was actually emanating from code inside of > blitz. Even thought the error message cites line 7 of testTernary.cpp, the > real problem is within the blitz header file <blitz/array/functorExpr.h>. > We are missing the typename keyword in several places within the definitions > of the BZ_DECLARE_FUNCTOR and BZ_DECLARE_MEMBER_FUNCTION macros. I have > attached a corrected version of this header file, and I will check this into > the blitz cvs repository. Thanks for mentioning this problem. > > Regards, Julian C. > > Dr. Julian C. Cummings > Staff Scientist, CACR/Caltech > (626) 3952543 > cummings@... 
From: Julian C. Cummings <cummings@ca...>  20031216 02:49:47

Hello Andrius, I owe you an apology. My explanation of the error message was correct, = but I didn't realize that the error was actually emanating from code inside = of blitz. Even thought the error message cites line 7 of testTernary.cpp, = the real problem is within the blitz header file = <blitz/array/functorExpr.h>. We are missing the typename keyword in several places within the = definitions of the BZ_DECLARE_FUNCTOR and BZ_DECLARE_MEMBER_FUNCTION macros. I have attached a corrected version of this header file, and I will check this = into the blitz cvs repository. Thanks for mentioning this problem. Regards, Julian C. Dr. Julian C. Cummings Staff Scientist, CACR/Caltech (626) 3952543 cummings@... =20 > Original Message > From: blitzsupportbounces@...=20 > [mailto:blitzsupportbounces@...] On Behalf Of=20 > Andrius Kurtinaitis > Sent: Sunday, December 14, 2003 11:13 PM > To: Support list for Blitz++ > Subject: Re: [Blitzsupport] functors >=20 >=20 > Julian, > thanks for the explanation. Unfortunately it did not work. > The only place in that simplistic example where i thought i can use=20 > typename, is this: BZ_DECLARE_FUNCTOR2( typename Mean ) > The compiler gives in this case some errors instead of the previous=20 > warnings... > Andrius >=20 > Julian C. Cummings wrote: > > Andrius, > >=20 > > The warning means that you should have used the "typename"=20 > keyword to=20 > > indicate that the expression that follows is a type. You=20 > need to use=20 > > "typename" whenever you are within some templated code and you are=20 > > extracting a templatedependent type using the :: operator. > >=20 > > Regards, Julian C. >=20 
From: Jonathan Stickel <jjstickel@sb...>  20031215 20:21:13

Please read the documentation about tensor notation and partial reductions (http://www.oonumerics.org/blitz/manual/blitz03.html#l75). Here is a quick example of how to use these features to do matrix multiplication: Array<double,2> A(m,p), B(p,n), C(m,n); //m,n,p are integer values firstIndex i; //for blitz tensor notation secondIndex j; thirdIndex k; A = [assignment]; B = [assignment]; C = sum(A(i,k)*B(k,j),k); // matrix multiply C(m,n)=A(m,p)*B(p,n) HTH, Jonathan Thomas Wharton wrote: > Greetings, > > I recently came across your Blitz++ lib and I am very impressed! However, I > cant seem to find any function that matrix multiples two (2D/3D) matrices > (though the element wise multiply via the '*' operator works great) Does > your library contain such a function? > > Many Thanks, > Thomas Wharton > Software Engineer > Raytheon Co. > > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > http://www.oonumerics.org/mailman/listinfo.cgi/blitzsupport > 
From: Andrius Kurtinaitis <andrius.kurtinaitis@ma...>  20031215 10:44:47

Sorry, i forgot to attach the cpp file. Andrius Kurtinaitis wrote: > Julian, > thanks for the explanation. Unfortunately it did not work. > The only place in that simplistic example where i thought i can use > typename, is this: BZ_DECLARE_FUNCTOR2( typename Mean ) > The compiler gives in this case some errors instead of the previous > warnings... > Andrius 
From: Andrius Kurtinaitis <andrius.kurtinaitis@ma...>  20031215 10:15:53

Julian, thanks for the explanation. Unfortunately it did not work. The only place in that simplistic example where i thought i can use typename, is this: BZ_DECLARE_FUNCTOR2( typename Mean ) The compiler gives in this case some errors instead of the previous warnings... Andrius Julian C. Cummings wrote: > Andrius, > > The warning means that you should have used the "typename" keyword to > indicate that the expression that follows is a type. You need to use > "typename" whenever you are within some templated code and you are > extracting a templatedependent type using the :: operator. > > Regards, Julian C. 
From: Julian C. Cummings <cummings@ca...>  20031215 01:29:47

Andrius, The warning means that you should have used the "typename" keyword to indicate that the expression that follows is a type. You need to use "typename" whenever you are within some templated code and you are extracting a templatedependent type using the :: operator. Regards, Julian C. > Original Message > From: blitzsupportbounces@... > [mailto:blitzsupportbounces@...] On Behalf Of > Andrius Kurtinaitis > Sent: Sunday, December 14, 2003 7:43 AM > To: Support list for Blitz++ > Subject: Re: [Blitzsupport] functors > > > Hello, > after all the discussions I decided to try the functors. > They work, but for binary and ternary functor definitions my compiler > gives some warnings. Does anybody know what they really mean > and what to > do with them? > The compiler is gcc version 3.3.3 20031206 (prerelease) > (Debian) The cpp file and the error log are attached. Regards Andrius > 
From: Andrius Kurtinaitis <andrius.kurtinaitis@ma...>  20031214 18:46:08

Hello, after all the discussions I decided to try the functors. They work, but for binary and ternary functor definitions my compiler gives some warnings. Does anybody know what they really mean and what to do with them? The compiler is gcc version 3.3.3 20031206 (prerelease) (Debian) The cpp file and the error log are attached. Regards Andrius 
From: Thomas Wharton <thomas_wharton@ro...>  20031212 22:26:49

Greetings, I recently came across your Blitz++ lib and I am very impressed! However, I cant seem to find any function that matrix multiples two (2D/3D) matrices (though the element wise multiply via the '*' operator works great) Does your library contain such a function? Many Thanks, Thomas Wharton Software Engineer Raytheon Co. 
From: Julian C. Cummings <cummings@ca...>  20031212 22:12:13

Andrius, I did not say that ternary functions don't exist, just that the example given previously was not appropriate. Hopefully, my previous email regarding the difference between fixed parameters and function arguments should have made this clear. The only difference between the functor and a function is that you can have state maintained in the functor object. So if you can have a ternary function, then you can have a threeargument functor as well. Regards, Julian C. > Original Message > From: blitzsupportbounces@... > [mailto:blitzsupportbounces@...] On Behalf Of > Andrius Kurtinaitis > Sent: Friday, December 12, 2003 3:17 AM > To: Support list for Blitz++ > Subject: Re: [Blitzsupport] functors > > > Julian Cummings wrote: > > The > > main point is that this is a unary function, not a ternary function. > > What is then the purpose of the threeargument functors? > > BZ_DECLARE_FUNCTOR(classname) // for one argument functors > BZ_DECLARE_FUNCTOR2(classname) // for two argument functors > BZ_DECLARE_FUNCTOR3(classname) // for three argument functors > > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > http://www.oonumerics.org/mailman/listinfo.cgi>; /blitzsupport > 
From: Andrius Kurtinaitis <andrius.kurtinaitis@ma...>  20031212 14:19:59

Julian Cummings wrote: > The > main point is that this is a unary function, not a ternary function. What is then the purpose of the threeargument functors? BZ_DECLARE_FUNCTOR(classname) // for one argument functors BZ_DECLARE_FUNCTOR2(classname) // for two argument functors BZ_DECLARE_FUNCTOR3(classname) // for three argument functors 
From: Andrius Kurtinaitis <andrius.kurtinaitis@ma...>  20031212 14:18:06

Hello, It seems that today blitz library has some useful functionality which is not mentioned in the supplied manual f.i.: stencilet.h, vectoret.h, functorExpr.h. Fortunately some of them are nicely documented in the header files. Maybe it would be useful to doxygenify them like recently in the Pooma project: http://www.tat.physik.unituebingen.de/~rguenth/pooma/reference/ Andrius > However, > the header file <blitz/array/stencilet.h> includes declarations of many > of the standard stencil operators as functions that can be applied to an > Array. So if you #include <blitz/array/stencilet.h>, the code will > compile. 
From: Julian Cummings <cummings@ca...>  20031212 00:10:40

Andrius, My point was that there is an inherent difference between a function "argument" and a function "parameter". An "argument" is a piece of data that the function applies to, whereas a parameter is a constant value needed by the function to do its thing. In Navneet's example of the gauss function, only the first argument to gauss() was a true "argument", while the second and third arguments were really parameters. Since a function does not have state (except for compiletime constants), you have to pass these parameters as arguments when you call the function. But a functor can have state, so you can pass the parameters once to the functor's constructor, and then just pass the data when applying the functor. Just to be clear, I would have written Navneet's example like this: template <typename T> class gauss { public: gauss(T mean, T var) : mean_(mean), var_(var) {} T operator()(T val) { /* gauss function implementation */ } BZ_DECLARE_FUNCTOR(gauss) private: T mean_, val_; }; int main() { Array<double,1> a(10); Array<float,1> b(10); // initialize arrays Array<double,1> resA(10); gauss<double> gaussFunc1(0, 10); resA = gaussFunc1(a); Array<float,1> resB(10); gauss<float> gaussFunc2(2, 5); resB = gaussFunc2(b); } Of course, you could specialize the gauss functor class template for types float and double if distinct implementations were needed. The main point is that this is a unary function, not a ternary function. Regards, Julian C. Andrius Kurtinaitis wrote: > Hello, > > I just looked into <blitz/array/functorExpr.h> and i did not see any > difference between blitzdeclared functions and functors except that > when when using functors, you can use class or instance methods (which > also operate on scalars). Also, in the case of instance methods you > can use the instance variables when evaluating the expression. > Am i right? > > Andrius > > Julian Cummings wrote: > >> Just an aside: this example is not a proper trinary function. A >> trinary function would act on three arrays of data. What you have >> here is a function that acts on a single array of data and requires >> two additional scalar input parameters. Such a function would best >> be captured in blitz by implementing it as a functor object that is >> initialized with values for the two scalar parameters. The functor >> would store these parameters as member data and operate on an array >> by providing an operator() method. See <blitz/array/functorExpr.h> >> for details. >> >>  Julian C. >> >> P.S. Apparently, trinary and ternary are synonyms, but ternary is >> the more commonly used term for an operator taking three arguments. >> > > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > http://www.oonumerics.org/mailman/listinfo.cgi/blitzsupport  Dr. Julian C. Cummings Email: cummings@... California Institute of Technology Phone: 6263952543 1200 E. California Blvd., Mail Code 15879 Fax: 6265845917 Pasadena, CA 91125 
From: Julian Cummings <cummings@ca...>  20031211 23:46:06

Hello Andrius, Andrius Kurtinaitis wrote: > >> blitz::Array<double,1> Aeven = A(even); >> blitz::Array<double,1> Aodd = A(odd); >> >> Aeven = central12(Aeven); >> Aodd = central12(Aodd); > > > I did not know that you can directly use difference operators on the > arrays (not only in stencil declarations). And in fact  i tried to > compile this example and i failed. Or was this just a pseudocode? I didn't actually test the code, just wrote it down. In any case, you cannot in fact directly use a stencil operator on an Array. However, the header file <blitz/array/stencilet.h> includes declarations of many of the standard stencil operators as functions that can be applied to an Array. So if you #include <blitz/array/stencilet.h>, the code will compile. (Actually, there is one other minor problem. The difference operators such as central12 are declared with the second argument for the dimension along which to difference being optional. But the analogous declaration for the central12 stencil function in stencilet.h does not have a default value for this second argument. So you would have to say central12(Aeven,0), for instance. I think this is an oversight, and I will fix this in the blitz repository in the near future.) > > Furthermore, I think that Aeven = central12(Aeven) is not the same as > A(even) = 0.5 * (A(even+1)  A(even1)), because Aeven already has > only even points and so has no chance to access odd points which are > in A(even+1) and A(even1). Probably you even did not mean that :) Yep, you're right! I tried this out and it doesn't work as expected for the reason you noted. This is another one of those things that I think worked in Pooma (using a "view engine" inside an Array to view a subarray while maintaining access to the whole original Array) but doesn't work in blitz. Sorry about that! But the first method I outlined should do what you asked for originally. Regards, Julian C.  Dr. Julian C. Cummings Email: cummings@... California Institute of Technology Phone: 6263952543 1200 E. California Blvd., Mail Code 15879 Fax: 6265845917 Pasadena, CA 91125 
From: Julian Cummings <cummings@ca...>  20031211 22:46:18

Hi David, There are several problems here. One is that there are many places within both the blitz stencil code and the cfd example code where int and double literals are being used. If these do not have an automatic conversion to your wrapper class type, there will be trouble. The other main issue is that your wrapper class type must act as an actual number type and support the standard builtin math operators. If you would be willing to send me directly a copy of your trevi.h header file, I might be able to massage the code enough to get it working for you. The key is to add explicit casts to the expected T_numtype in the appropriate places, rather than using raw literal values. Regards, Julian C. david moloney wrote: >I have a working overloaded class which is a wrapper for a double which >I use fof profiling applications written using mtl and itl. I was >interested in porting it to Blitz++ and tried it out using the cfd.cpp >example provided. > >As shown below I can use a #define switch to switch between using >doubles or my overloaded tr_doubles > >#define USE_TREVI > >#ifdef USE_TREVI > #include "trevi.h" > typedef tr_double dbl; >#endif > >#ifndef USE_TREVI > typedef double dbl; >#endif > >cfd.cpp body with dbl substituted for double > >Obviously if I use double as the base type there is no issue, >unfortunately when I compile the application >using the tr_double class I get a large number of errors related to >stencil.h and stencilops.h ... see attached logfile from gcc. > >Has anybody an idea of where to start solving this problem? I know a >reasonable amount about C++ but have not used stencils to date. > > David > > > > > > > >g++ ftemplatedepth30 I/home/david/masters/Masters/Work/AppInterface/trevi/ c o cfd.o cfd.cpp >cfd.cpp: In function `void setup (int, vectorField &, vectorField &, >scalarField &, scalarField &, vectorField &, vectorField &)': >cfd.cpp:192: no match for `blitz::Array<vector3d, 3> & = double' >/usr/local/include/blitz/arrayimpl.h:2275: candidates are: >blitz::ListInitializationSwitch<blitz::Array<T, N>, P_numtype *> blitz::Array<T, N>::operator= >(P_numtype) [with P_numtype = vector3d, int N_rank = 3] >/usr/local/include/blitz/array/ops.cc:78: blitz::Array<T, N> &blitz::Array<T, >N>::operator= (const blitz::Array<T, N> &) [with P_numtype = vector3d, int N_rank = 3] >cfd.cpp:194: no match for `blitz::Array<vector3d, 3> & = double' >/usr/local/include/blitz/arrayimpl.h:2275: candidates are: >blitz::ListInitializationSwitch<blitz::Array<T, N>, P_numtype *> blitz::Array<T, N>::operator= >(P_numtype) [with P_numtype = vector3d, int N_rank = 3] >/usr/local/include/blitz/array/ops.cc:78: blitz::Array<T, N> &blitz::Array<T, >N>::operator= (const blitz::Array<T, N> &) [with P_numtype = vector3d, int N_rank = 3] >cfd.cpp:195: no match for `blitz::Array<vector3d, 3> & = double' >/usr/local/include/blitz/arrayimpl.h:2275: candidates are: >blitz::ListInitializationSwitch<blitz::Array<T, N>, P_numtype *> blitz::Array<T, N>::operator= >(P_numtype) [with P_numtype = vector3d, int N_rank = 3] >/usr/local/include/blitz/array/ops.cc:78: blitz::Array<T, N> &blitz::Array<T, >N>::operator= (const blitz::Array<T, N> &) [with P_numtype = vector3d, int N_rank = 3] >cfd.cpp: In function `int main ()': >cfd.cpp:414: no match for `vectorField & = double' >/usr/local/include/blitz/arrayimpl.h:2275: candidates are: >blitz::ListInitializationSwitch<blitz::Array<T, N>, P_numtype *> blitz::Array<T, N>::operator= >(P_numtype) [with P_numtype = vector3d, int N_rank = 3] >/usr/local/include/blitz/array/ops.cc:78: blitz::Array<T, N> &blitz::Array<T, >N>::operator= (const blitz::Array<T, N> &) [with P_numtype = vector3d, int N_rank = 3] >/usr/local/include/blitz/array/stencilops.h: In function `typename T::T_numtype blitz::Laplacian3D4 (T >&) [with T = blitz::stencilExtent<3, dbl>]': >/usr/local/include/blitz/array/stencilops.h:111: instantiated from `blitz::Laplacian3D4n (T &) [with T = blitz::stencilExtent<3, dbl>]' >/usr/local/include/blitz/array/stencilops.h:1112: instantiated from `blitz::Laplacian3D4 (T &, const blitz::UniformCubicGeometry<3, T_defaultSpatialCoordinate> &) [with T = blitz::stencilExtent<3, dbl>]' >cfd.cpp:156: instantiated from `P_solver_update::apply (T1 &, T2 &, T3, T4, T5, T6, T7, T8, T9, T10, T11) [with T1 = blitz::stencilExtent<3, dbl>, T2 = blitz::stencilExtent<3, dbl>, 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>]' >/usr/local/include/blitz/array/stencils.cc:116: instantiated from `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, dbl>, int N_rank = 3, T_stencil = P_solver_update, T_numtype1 = dbl, T_array2 = blitz::Array<dbl, 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]' >/usr/local/include/blitz/array/stencils.cc:140: instantiated from `blitz::interiorDomain (const T_stencil &, const blitz::Array<T_numtype1, N_rank> &, const T_array2 &) [with int N_rank = 3, T_stencil = P_solver_update, T_numtype1 = dbl, T_array2 = blitz::Array<dbl, 3>]' >/usr/local/include/blitz/array/cgsolve.h:71: instantiated from `blitz::conjugateGradientSolver (T_stencil, blitz::Array<T_numtype1, N_rank> &, blitz::Array<T_numtype1, N_rank> &, double, const T_BCs &) [with T_stencil = P_solver_update, T_numtype = dbl, int N_rank = 3, T_BCs = PressureBCs]' >cfd.cpp:335: instantiated from here >/usr/local/include/blitz/array/stencilops.h:107: no match for `blitz::dummy<dbl> + blitz::dummy<dbl>' >/usr/local/include/blitz/meta/metaprog.h:56: candidates are: T blitz::operator+ (const T &, >blitz::_bz_meta_nullOperand) [with T = blitz::dummy<dbl>] >/usr/local/include/blitz/vecbops.cc:621: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::Range, blitz::_bz_Add<int, int> > > >blitz::operator+ (blitz::Range, blitz::Range) >/usr/local/include/blitz/vecbops.cc:655: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<float>, >blitz::_bz_Add<int, float> > > blitz::operator+ (blitz::Range, float) >/usr/local/include/blitz/vecbops.cc:672: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<double>, >blitz::_bz_Add<int, double> > > blitz::operator+ (blitz::Range, double) >/usr/local/include/blitz/vecbops.cc:689: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<long double>, >blitz::_bz_Add<int, long double> > > blitz::operator+ (blitz::Range, long double) >/usr/local/include/blitz/vecbops.cc:1018: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<float>, blitz::Range, >blitz::_bz_Add<float, int> > > blitz::operator+ (float, blitz::Range) >/usr/local/include/blitz/vecbops.cc:1103: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<double>, blitz::Range, >blitz::_bz_Add<double, int> > > blitz::operator+ (double, blitz::Range) >/usr/local/include/blitz/vecbops.cc:1188: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<long double>, blitz::Range, >blitz::_bz_Add<long double, int> > > blitz::operator+ (long double, blitz::Range) >/usr/include/g++3/std/ldcomplex.h:62: complex<long >double> operator+ (long double, const complex<long double> &) >/usr/include/g++3/std/ldcomplex.h:60: complex<long >double> operator+ (const complex<long double> &, long double) >/usr/include/g++3/std/dcomplex.h:62: complex<double> >operator+ (double, const complex<double> &) >/usr/include/g++3/std/dcomplex.h:60: complex<double> >operator+ (const complex<double> &, double) >/usr/include/g++3/std/fcomplex.h:62: complex<float> >operator+ (float, const complex<float> &) >/usr/include/g++3/std/fcomplex.h:60: complex<float> >operator+ (const complex<float> &, float) >/usr/local/include/blitz/array/stencilops.h:111: instantiated from `blitz::Laplacian3D4n (T &) [with T = blitz::stencilExtent<3, dbl>]' >/usr/local/include/blitz/array/stencilops.h:1112: instantiated from `blitz::Laplacian3D4 (T &, const blitz::UniformCubicGeometry<3, T_defaultSpatialCoordinate> &) [with T = blitz::stencilExtent<3, dbl>]' >cfd.cpp:156: instantiated from `P_solver_update::apply (T1 &, T2 &, T3, T4, T5, T6, T7, T8, T9, T10, T11) [with T1 = blitz::stencilExtent<3, dbl>, T2 = blitz::stencilExtent<3, dbl>, 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>]' >/usr/local/include/blitz/array/stencils.cc:116: instantiated from `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, dbl>, int N_rank = 3, T_stencil = P_solver_update, T_numtype1 = dbl, T_array2 = blitz::Array<dbl, 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]' >/usr/local/include/blitz/array/stencils.cc:140: instantiated from `blitz::interiorDomain (const T_stencil &, const blitz::Array<T_numtype1, N_rank> &, const T_array2 &) [with int N_rank = 3, T_stencil = P_solver_update, T_numtype1 = dbl, T_array2 = blitz::Array<dbl, 3>]' >/usr/local/include/blitz/array/cgsolve.h:71: instantiated from `blitz::conjugateGradientSolver (T_stencil, blitz::Array<T_numtype1, N_rank> &, blitz::Array<T_numtype1, N_rank> &, double, const T_BCs &) [with T_stencil = P_solver_update, T_numtype = dbl, int N_rank = 3, T_BCs = PressureBCs]' >cfd.cpp:335: instantiated from here >/usr/local/include/blitz/array/stencilops.h:107: no match for `blitz::dummy<dbl> + blitz::dummy<dbl>' >/usr/local/include/blitz/meta/metaprog.h:56: candidates are: T blitz::operator+ (const T &, >blitz::_bz_meta_nullOperand) [with T = blitz::dummy<dbl>] >/usr/local/include/blitz/vecbops.cc:621: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::Range, blitz::_bz_Add<int, int> > > >blitz::operator+ (blitz::Range, blitz::Range) >/usr/local/include/blitz/vecbops.cc:655: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<float>, >blitz::_bz_Add<int, float> > > blitz::operator+ (blitz::Range, float) >/usr/local/include/blitz/vecbops.cc:672: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<double>, >blitz::_bz_Add<int, double> > > blitz::operator+ (blitz::Range, double) >/usr/local/include/blitz/vecbops.cc:689: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<long double>, >blitz::_bz_Add<int, long double> > > blitz::operator+ (blitz::Range, long double) >/usr/local/include/blitz/vecbops.cc:1018: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<float>, blitz::Range, >blitz::_bz_Add<float, int> > > blitz::operator+ (float, blitz::Range) >/usr/local/include/blitz/vecbops.cc:1103: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<double>, blitz::Range, >blitz::_bz_Add<double, int> > > blitz::operator+ (double, blitz::Range) >/usr/local/include/blitz/vecbops.cc:1188: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<long double>, blitz::Range, >blitz::_bz_Add<long double, int> > > blitz::operator+ (long double, blitz::Range) >/usr/include/g++3/std/ldcomplex.h:62: complex<long >double> operator+ (long double, const complex<long double> &) >/usr/include/g++3/std/ldcomplex.h:60: complex<long >double> operator+ (const complex<long double> &, long double) >/usr/include/g++3/std/dcomplex.h:62: complex<double> >operator+ (double, const complex<double> &) >/usr/include/g++3/std/dcomplex.h:60: complex<double> >operator+ (const complex<double> &, double) >/usr/include/g++3/std/fcomplex.h:62: complex<float> >operator+ (float, const complex<float> &) >/usr/include/g++3/std/fcomplex.h:60: complex<float> >operator+ (const complex<float> &, float) >/usr/local/include/blitz/array/stencilops.h:107: no match for `double * blitz::stencilExtent<3, dbl> &' >/usr/local/include/blitz/meta/metaprog.h:58: candidates are: T blitz::operator* (const T &, >blitz::_bz_meta_nullOperand) [with T = double] >/usr/local/include/blitz/vecbops.cc:3169: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::Range, blitz::_bz_Multiply<int, int> > > >blitz::operator* (blitz::Range, blitz::Range) >/usr/local/include/blitz/vecbops.cc:3203: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<float>, >blitz::_bz_Multiply<int, float> > > blitz::operator* (blitz::Range, float) >/usr/local/include/blitz/vecbops.cc:3220: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<double>, >blitz::_bz_Multiply<int, double> > > blitz::operator* (blitz::Range, double) >/usr/local/include/blitz/vecbops.cc:3237: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<long double>, >blitz::_bz_Multiply<int, long double> > > blitz::operator* (blitz::Range, long double) >/usr/local/include/blitz/vecbops.cc:3566: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<float>, blitz::Range, >blitz::_bz_Multiply<float, int> > > blitz::operator* (float, blitz::Range) >/usr/local/include/blitz/vecbops.cc:3651: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<double>, blitz::Range, >blitz::_bz_Multiply<double, int> > > blitz::operator* (double, blitz::Range) >/usr/local/include/blitz/vecbops.cc:3736: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<long double>, blitz::Range, >blitz::_bz_Multiply<long double, int> > > blitz::operator* (long double, blitz::Range) >/usr/include/g++3/std/ldcomplex.h:70: complex<long >double> operator* (long double, const complex<long double> &) >/usr/include/g++3/std/ldcomplex.h:68: complex<long >double> operator* (const complex<long double> &, long double) >/usr/include/g++3/std/dcomplex.h:70: complex<double> >operator* (double, const complex<double> &) >/usr/include/g++3/std/dcomplex.h:68: complex<double> >operator* (const complex<double> &, double) >/usr/include/g++3/std/fcomplex.h:70: complex<float> >operator* (float, const complex<float> &) >/usr/include/g++3/std/fcomplex.h:68: complex<float> >operator* (const complex<float> &, float) >/usr/local/include/blitz/array/stencilops.h: In function `typename T::T_numtype blitz::Laplacian3D4 (T >&) [with T = blitz::FastArrayIterator<dbl, 3>]': >/usr/local/include/blitz/array/stencilops.h:111: instantiated from `blitz::Laplacian3D4n (T &) [with T = blitz::FastArrayIterator<dbl, 3>]' >/usr/local/include/blitz/array/stencilops.h:1112: instantiated from `blitz::Laplacian3D4 (T &, const blitz::UniformCubicGeometry<3, T_defaultSpatialCoordinate> &) [with T = blitz::FastArrayIterator<dbl, 3>]' >cfd.cpp:156: instantiated from `P_solver_update::apply (T1 &, T2 &, T3, T4, T5, T6, T7, T8, T9, T10, T11) [with T1 = blitz::FastArrayIterator<dbl, 3>, T2 = blitz::FastArrayIterator<dbl, 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>]' >/usr/local/include/blitz/array/stencils.cc:292: instantiated from `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 = P_solver_update, T_numtype1 = dbl, T_array2 = blitz::Array<dbl, 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]' >/usr/local/include/blitz/array/stencils.cc:520: instantiated from `blitz::applyStencil (const T_stencil &, blitz::Array<T_numtype1, N_rank> &, T_array2 &) [with T_stencil = P_solver_update, T_numtype1 = dbl, int N_rank = 3, T_array2 = blitz::Array<dbl, 3>]' >/usr/local/include/blitz/array/cgsolve.h:82: instantiated from `blitz::conjugateGradientSolver (T_stencil, blitz::Array<T_numtype1, N_rank> &, blitz::Array<T_numtype1, N_rank> &, double, const T_BCs &) [with T_stencil = P_solver_update, T_numtype = dbl, int N_rank = 3, T_BCs = PressureBCs]' >cfd.cpp:335: instantiated from here >/usr/local/include/blitz/array/stencilops.h:107: no match for `double * blitz::FastArrayIterator<dbl, >3> &' >/usr/local/include/blitz/meta/metaprog.h:58: candidates are: T blitz::operator* (const T &, >blitz::_bz_meta_nullOperand) [with T = double] >/usr/local/include/blitz/vecbops.cc:3169: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::Range, blitz::_bz_Multiply<int, int> > > >blitz::operator* (blitz::Range, blitz::Range) >/usr/local/include/blitz/vecbops.cc:3203: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<float>, >blitz::_bz_Multiply<int, float> > > blitz::operator* (blitz::Range, float) >/usr/local/include/blitz/vecbops.cc:3220: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<double>, >blitz::_bz_Multiply<int, double> > > blitz::operator* (blitz::Range, double) >/usr/local/include/blitz/vecbops.cc:3237: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<long double>, >blitz::_bz_Multiply<int, long double> > > blitz::operator* (blitz::Range, long double) >/usr/local/include/blitz/vecbops.cc:3566: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<float>, blitz::Range, >blitz::_bz_Multiply<float, int> > > blitz::operator* (float, blitz::Range) >/usr/local/include/blitz/vecbops.cc:3651: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<double>, blitz::Range, >blitz::_bz_Multiply<double, int> > > blitz::operator* (double, blitz::Range) >/usr/local/include/blitz/vecbops.cc:3736: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<long double>, blitz::Range, >blitz::_bz_Multiply<long double, int> > > blitz::operator* (long double, blitz::Range) >/usr/include/g++3/std/ldcomplex.h:70: complex<long >double> operator* (long double, const complex<long double> &) >/usr/include/g++3/std/ldcomplex.h:68: complex<long >double> operator* (const complex<long double> &, long double) >/usr/include/g++3/std/dcomplex.h:70: complex<double> >operator* (double, const complex<double> &) >/usr/include/g++3/std/dcomplex.h:68: complex<double> >operator* (const complex<double> &, double) >/usr/include/g++3/std/fcomplex.h:70: complex<float> >operator* (float, const complex<float> &) >/usr/include/g++3/std/fcomplex.h:68: complex<float> >operator* (const complex<float> &, float) >/usr/local/include/blitz/array/stencilops.h: In function `typename T::T_numtype blitz::central14 (T &, >int) [with T = blitz::stencilExtent<3, dbl>]': >/usr/local/include/blitz/array/stencilops.h:1171: instantiated from `blitz::grad3D4 (T &, const blitz::UniformCubicGeometry<3, T_defaultSpatialCoordinate> &) [with T = blitz::stencilExtent<3, dbl>]' >cfd.cpp:139: instantiated from `timestep::apply (T1 &, T2 &, T3 &, T4 &, T5 &, T6, T7, T8, T9, T10, T11) [with T1 = blitz::stencilExtent<3, vector3d>, T2 = blitz::stencilExtent<3, vector3d>, T3 = blitz::stencilExtent<3, dbl>, T4 = blitz::stencilExtent<3, vector3d>, T5 = blitz::stencilExtent<3, vector3d>, T6 = blitz::dummy<double>, T7 = blitz::dummy<double>, T8 = blitz::dummy<double>, T9 = blitz::dummy<double>, T10 = blitz::dummy<double>, T11 = blitz::dummy<double>]' >/usr/local/include/blitz/array/stencils.cc:116: instantiated from `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, vector3d>, int N_rank = 3, T_stencil = timestep, T_numtype1 = vector3d, T_array2 = blitz::Array<vector3d, 3>, T_array3 = blitz::Array<dbl, 3>, T_array4 = blitz::Array<vector3d, 3>, T_array5 = blitz::Array<vector3d, 3>, T_array6 = blitz::dummyArray, T_array7 = blitz::dummyArray, T_array8 = blitz::dummyArray, T_array9 = blitz::dummyArray, T_array10 = blitz::dummyArray, T_array11 = blitz::dummyArray]' >/usr/local/include/blitz/array/stencils.cc:164: instantiated from `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 = timestep, T_numtype1 = vector3d, T_array2 = blitz::Array<vector3d, 3>, T_array3 = blitz::Array<dbl, 3>, T_array4 = blitz::Array<vector3d, 3>, T_array5 = blitz::Array<vector3d, 3>, 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]' >/usr/local/include/blitz/array/stencils.cc:199: instantiated from `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 = timestep, T_numtype1 = vector3d, T_array2 = blitz::Array<vector3d, 3>, T_array3 = blitz::Array<dbl, 3>, T_array4 = blitz::Array<vector3d, 3>, T_array5 = blitz::Array<vector3d, 3>, T_array6 = blitz::dummyArray, T_array7 = blitz::dummyArray, T_array8 = blitz::dummyArray, T_array9 = blitz::dummyArray, T_array10 = blitz::dummyArray, T_array11 = blitz::dummyArray]' >/usr/local/include/blitz/array/stencils.cc:219: instantiated from `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 = timestep, T_numtype1 = vector3d, T_array2 = blitz::Array<vector3d, 3>, T_array3 = blitz::Array<dbl, 3>, T_array4 = blitz::Array<vector3d, 3>, T_array5 = blitz::Array<vector3d, 3>, T_array6 = blitz::dummyArray, T_array7 = blitz::dummyArray, T_array8 = blitz::dummyArray, T_array9 = blitz::dummyArray, T_array10 = blitz::dummyArray, T_array11 = blitz::dummyArray]' >/usr/local/include/blitz/array/stencils.cc:548: instantiated from `blitz::applyStencil (const T_stencil &, blitz::Array<T_numtype1, N_rank> &, T_array2 &, T_array3 &, T_array4 &, T_array5 &) [with T_stencil = timestep, T_numtype1 = vector3d, int N_rank = 3, T_array2 = blitz::Array<vector3d, 3>, T_array3 = blitz::Array<dbl, 3>, T_array4 = blitz::Array<vector3d, 3>, T_array5 = blitz::Array<vector3d, 3>]' >cfd.cpp:338: instantiated from here >/usr/local/include/blitz/array/stencilops.h:217: no match for `blitz::dummy<dbl>  blitz::dummy<dbl>' >/usr/local/include/blitz/vecexpr.h:289: candidates are: >blitz::_bz_VecExpr<blitz::_bz_VecExprUnaryOp<blitz::Range, >blitz::_bz_negate<int> > > blitz::operator (blitz::Range) >/usr/local/include/blitz/vecbops.cc:1895: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::Range, blitz::_bz_Subtract<int, int> > > >blitz::operator (blitz::Range, blitz::Range) >/usr/local/include/blitz/vecbops.cc:1929: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<float>, >blitz::_bz_Subtract<int, float> > > blitz::operator (blitz::Range, float) >/usr/local/include/blitz/vecbops.cc:1946: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<double>, >blitz::_bz_Subtract<int, double> > > blitz::operator (blitz::Range, double) >/usr/local/include/blitz/vecbops.cc:1963: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<long double>, >blitz::_bz_Subtract<int, long double> > > blitz::operator (blitz::Range, long double) >/usr/local/include/blitz/vecbops.cc:2292: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<float>, blitz::Range, >blitz::_bz_Subtract<float, int> > > blitz::operator (float, blitz::Range) >/usr/local/include/blitz/vecbops.cc:2377: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<double>, blitz::Range, >blitz::_bz_Subtract<double, int> > > blitz::operator (double, blitz::Range) >/usr/local/include/blitz/vecbops.cc:2462: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<long double>, blitz::Range, >blitz::_bz_Subtract<long double, int> > > blitz::operator (long double, blitz::Range) >/usr/include/g++3/std/ldcomplex.h:66: complex<long >double> operator (long double, const complex<long double> &) >/usr/include/g++3/std/ldcomplex.h:64: complex<long >double> operator (const complex<long double> &, long double) >/usr/include/g++3/std/dcomplex.h:66: complex<double> >operator (double, const complex<double> &) >/usr/include/g++3/std/dcomplex.h:64: complex<double> >operator (const complex<double> &, double) >/usr/include/g++3/std/fcomplex.h:66: complex<float> >operator (float, const complex<float> &) >/usr/include/g++3/std/fcomplex.h:64: complex<float> >operator (const complex<float> &, float) >/usr/local/include/blitz/array/stencilops.h:217: no match for `blitz::dummy<dbl>  blitz::dummy<dbl>' >/usr/local/include/blitz/vecexpr.h:289: candidates are: >blitz::_bz_VecExpr<blitz::_bz_VecExprUnaryOp<blitz::Range, >blitz::_bz_negate<int> > > blitz::operator (blitz::Range) >/usr/local/include/blitz/vecbops.cc:1895: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::Range, blitz::_bz_Subtract<int, int> > > >blitz::operator (blitz::Range, blitz::Range) >/usr/local/include/blitz/vecbops.cc:1929: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<float>, >blitz::_bz_Subtract<int, float> > > blitz::operator (blitz::Range, float) >/usr/local/include/blitz/vecbops.cc:1946: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<double>, >blitz::_bz_Subtract<int, double> > > blitz::operator (blitz::Range, double) >/usr/local/include/blitz/vecbops.cc:1963: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::Range, blitz::_bz_VecExprConstant<long double>, >blitz::_bz_Subtract<int, long double> > > blitz::operator (blitz::Range, long double) >/usr/local/include/blitz/vecbops.cc:2292: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<float>, blitz::Range, >blitz::_bz_Subtract<float, int> > > blitz::operator (float, blitz::Range) >/usr/local/include/blitz/vecbops.cc:2377: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<double>, blitz::Range, >blitz::_bz_Subtract<double, int> > > blitz::operator (double, blitz::Range) >/usr/local/include/blitz/vecbops.cc:2462: >blitz::_bz_VecExpr<blitz::_bz_VecExprOp<blitz::_bz_VecExprConstant<long double>, blitz::Range, >blitz::_bz_Subtract<long double, int> > > blitz::operator (long double, blitz::Range) >/usr/include/g++3/std/ldcomplex.h:66: complex<long >double> operator (long double, const complex<long double> &) >/usr/include/g++3/std/ldcomplex.h:64: complex<long >double> operator (const complex<long double> &, long double) >/usr/include/g++3/std/dcomplex.h:66: complex<double> >operator (double, const complex<double> &) >/usr/include/g++3/std/dcomplex.h:64: complex<double> >operator (const complex<double> &, double) >/usr/include/g++3/std/fcomplex.h:66: complex<float> >operator (float, const complex<float> &) >/usr/include/g++3/std/fcomplex.h:64: complex<float> >operator (const complex<float> &, float) >/usr/local/include/blitz/array/stencils.h: In method `blitz::dummy<P_numtype> >blitz::stencilExtent<N_rank, P_numtype>::shift (int, int) [with int N_rank = 3, P_numtype = vector3d]': >/usr/local/include/blitz/array/stencilops.h:241: instantiated from `blitz::central14 (T &, int, int) [with T = blitz::stencilExtent<3, vector3d>]' >/usr/local/include/blitz/array/stencilops.h:1105: instantiated from `blitz::div3DVec4 (T &, const blitz::UniformCubicGeometry<3, T_defaultSpatialCoordinate> &) [with T = blitz::stencilExtent<3, vector3d>]' >cfd.cpp:148: instantiated from `calc_P_rhs::apply (T1 &, T2 &, T3, T4, T5, T6, T7, T8, T9, T10, T11) [with T1 = blitz::stencilExtent<3, dbl>, T2 = blitz::stencilExtent<3, vector3d>, 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>]' >/usr/local/include/blitz/array/stencils.cc:116: instantiated from `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, dbl>, int N_rank = 3, T_stencil = calc_P_rhs, T_numtype1 = dbl, T_array2 = blitz::Array<vector3d, 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]' >/usr/local/include/blitz/array/stencils.cc:164: instantiated from `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 = calc_P_rhs, T_numtype1 = dbl, T_array2 = blitz::Array<vector3d, 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]' >/usr/local/include/blitz/array/stencils.cc:199: instantiated from `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 = calc_P_rhs, T_numtype1 = dbl, T_array2 = blitz::Array<vector3d, 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]' >/usr/local/include/blitz/array/stencils.cc:219: instantiated from `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 = calc_P_rhs, T_numtype1 = dbl, T_array2 = blitz::Array<vector3d, 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]' >/usr/local/include/blitz/array/stencils.cc:520: instantiated from `blitz::applyStencil (const T_stencil &, blitz::Array<T_numtype1, N_rank> &, T_array2 &) [with T_stencil = calc_P_rhs, T_numtype1 = dbl, int N_rank = 3, T_array2 = blitz::Array<vector3d, 3>]' >cfd.cpp:333: instantiated from here >/usr/local/include/blitz/array/stencils.h:246: no matching function for call to >`blitz::dummy<vector3d>::dummy (int)' >/usr/local/include/blitz/array/stencils.h:174: candidates are: blitz::dummy<T>::dummy () [with T = >vector3d] >/usr/local/include/blitz/array/stencils.h:177: blitz::dummy<T>::dummy (T) [with T = >vector3d] >/usr/local/include/blitz/array/stencils.h:181: blitz::dummy<T>::dummy (const >blitz::dummyArray &) [with T = vector3d] >/usr/local/include/blitz/array/stencils.h:172: blitz::dummy<vector3d>::dummy (const >blitz::dummy<vector3d> &) >make: *** [cfd.o] Error 1 > > > > >_______________________________________________ >Blitzsupport mailing list >Blitzsupport@... >http://www.oonumerics.org/mailman/listinfo.cgi/blitzsupport > >  Dr. Julian C. Cummings Email: cummings@... California Institute of Technology Phone: 6263952543 1200 E. California Blvd., Mail Code 15879 Fax: 6265845917 Pasadena, CA 91125 
From: david moloney <moloned@tc...>  20031211 17:59:14

I have a working overloaded class which is a wrapper for a double which I use fof profiling applications written using mtl and itl. I was interested in porting it to Blitz++ and tried it out using the cfd.cpp example provided. As shown below I can use a #define switch to switch between using doubles or my overloaded tr_doubles #define USE_TREVI #ifdef USE_TREVI #include "trevi.h" typedef tr_double dbl; #endif #ifndef USE_TREVI typedef double dbl; #endif cfd.cpp body with dbl substituted for double Obviously if I use double as the base type there is no issue, unfortunately when I compile the application using the tr_double class I get a large number of errors related to stencil.h and stencilops.h ... see attached logfile from gcc. Has anybody an idea of where to start solving this problem? I know a reasonable amount about C++ but have not used stencils to date.  David 
From: Andrius Kurtinaitis <andrius.kurtinaitis@ma...>  20031211 12:58:02

Hello, I just looked into <blitz/array/functorExpr.h> and i did not see any difference between blitzdeclared functions and functors except that when when using functors, you can use class or instance methods (which also operate on scalars). Also, in the case of instance methods you can use the instance variables when evaluating the expression. Am i right? Andrius Julian Cummings wrote: > Just an aside: this example is not a proper trinary function. A trinary > function would act on three arrays of data. What you have here is a > function that acts on a single array of data and requires two additional > scalar input parameters. Such a function would best be captured in > blitz by implementing it as a functor object that is initialized with > values for the two scalar parameters. The functor would store these > parameters as member data and operate on an array by providing an > operator() method. See <blitz/array/functorExpr.h> for details. > >  Julian C. > > P.S. Apparently, trinary and ternary are synonyms, but ternary is the > more commonly used term for an operator taking three arguments. > 
From: Navneet Dalal <Navneet.D<alal@in...>  20031211 12:54:22

On Wed, 10 Dec 2003 11:41:46 0800, Julian Cummings <cummings@...> wrote: > Hello Navneet, > > Navneet Dalal wrote: > >> >> Coming to your problerm (if I understood it right) you want to define, >> let us say, two functions: >> >> double gauss(double val, double mean, double var); >> float gauss(float val, float mean, float var); >> >> And then you would like to evaluate gauss on a Array<double,1> or on a >> Array<float,1>. >> For this, you just use BZ_DECLARE_FUNCTION3 as: >> >> BZ_DECLARE_FUNCTION3(gauss); >> >> int main() { >> Array<double,1> a(10); >> Array<float ,1> b(10); >> >> // initialize arrays >> Array<double,1> resA(10); >> resA = gauss(a, 0, 10); // 0 mean and 10 var >> >> Array<float ,1> resB(10); >> resB = gauss(b, 2, 5); // 2 mean and 5 var >> } > > Just an aside: this example is not a proper trinary function. A trinary > function would act on three arrays of data. What you have here is a > function that acts on a single array of data and requires two additional > scalar input parameters. Such a function would best be captured in > blitz by implementing it as a functor object that is initialized with > values for the two scalar parameters. The functor would store these > parameters as member data and operate on an array by providing an > operator() method. See <blitz/array/functorExpr.h> for details. > >  Julian C. One question here: the way trinary functions are defined in blitz, blitz creates a constant Array Expression for above examples. I agree that it is an unnecessary overhead for compiler, but does it has performance penalty also?  navneet 