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
(4) 
3
(1) 
4

5
(2) 
6
(7) 
7
(7) 
8

9
(2) 
10

11
(1) 
12
(2) 
13

14
(2) 
15

16

17

18

19
(2) 
20

21
(1) 
22
(2) 
23

24
(1) 
25
(1) 
26

27
(2) 
28
(1) 
29

30

31

From: Julian Cummings <cummings@ca...>  20080528 22:04:15

I have applied this patch to the cvs repository. Thanks!  Julian C. On Wed, 20080514 at 13:01 0400, Volker Braun wrote: > gcc 4.3.0 warns about possible mistakes in && vs.  precedence if > compiling with Wall, for example > > range.h:91: warning: suggest parentheses around && within  > > Whether one likes this warning or not, it would good to keep the > compiler happy. This patch (on top of blitz CVS) adds extra parentheses, > and gcc stops complaining. > > > =================================================================== > RCS file: /cvsroot/blitz/blitz/blitz/range.h,v > retrieving revision 1.13 > diff u r1.13 range.h >  blitz/range.h 23 Apr 2008 02:38:35 0000 1.13 > +++ blitz/range.h 14 May 2008 16:53:59 0000 > @@ 89,8 +89,8 @@ > : first_(first), last_(last), stride_(stride) > { > BZPRECHECK((first == fromStart)  (last == toEnd)  >  (first < last) && (stride > 0)  >  (first > last) && (stride < 0)  > + ((first < last) && (stride > 0))  > + ((first > last) && (stride < 0))  > (first == last), (*this) << " is an invalid range."); > BZPRECHECK((first == fromStart)  (last == toEnd)  > (lastfirst) % stride == 0, > @@ 124,13 +124,13 @@ > > bool isAscendingContiguous() const > { >  return ((first_ < last_) && (stride_ == 1)  (first_ == last_)); > + return ( ((first_ < last_) && (stride_ == 1))  (first_ == last_)); > } > > void setRange(T_numtype first, T_numtype last, T_numtype stride=1) > { >  BZPRECONDITION((first < last) && (stride > 0)  >  (first > last) && (stride < 0)  > + BZPRECONDITION(((first < last) && (stride > 0))  > + ((first > last) && (stride < 0))  > (first == last)); > BZPRECONDITION((lastfirst) % stride == 0); > first_ = first; > =================================================================== > RCS file: /cvsroot/blitz/blitz/blitz/array/slicing.cc,v > retrieving revision 1.12 > diff u r1.12 slicing.cc >  blitz/array/slicing.cc 17 Sep 2004 08:38:44 0000 1.12 > +++ blitz/array/slicing.cc 14 May 2008 16:54:00 0000 > @@ 325,8 +325,8 @@ > #endif > > BZPRECHECK( >  ((first <= last) && (stride > 0) >   (first >= last) && (stride < 0)) > + ( ((first <= last) && (stride > 0))  > + ((first >= last) && (stride < 0)) ) > && (first >= base(rank) && (first  base(rank)) < length_[rank]) > && (last >= base(rank) && (last  base(rank)) < length_[rank]), > "Bad array slice: Range(" << first << ", " << last << ", " > > > >  > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > https://lists.sourceforge.net/lists/listinfo/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 Office: 125 PowellBooth 
From: Julian Cummings <cummings@ca...>  20080527 18:19:42

Hello Roman, The ColumnMajorArray<4> object is not actually an array, but rather an array storage ordering type that indicates the preferred storage scheme. This object should be used as an additional argument to an Array constructor to tell it what storage ordering is desired (see Section 2.9 of the Blitz documentation). The only difference between ColumnMajorArray<> and FortranArray<> is that with FortranArray<> the array indexing starts with 1 instead of 0. So you could change your declaration of "M" to be just a normal Array<double,4>, and then your code should compile properly. Regards, Julian C. On Tue, 20080527 at 13:29 +0100, roman binter wrote: > Hi > > i am new to blitz and C++ so my question may be silly. I am trying to > define a class performing matrix multiplication of 4 dimensional > arrays. i try to declare a Fortran type array in the public part of > my class. I want this array to catch the output of the matrix > multiplication. The compiler complains. Could you please glance over my > code snippet to see if there is anything obvious going wrong? > > cheers, roman > > class propagator { > public: > propagator(Array<double,4>, Array<double,4>); > ColumnMajorArray<4> M; > private: > firstIndex o; > secondIndex p; > thirdIndex q; > fourthIndex r; > fifthIndex t; > > }; > > propagator::propagator(Array<double,4> a, Array<double,4> b){ > Array<double,4> T = a; > Array<double,4> M_old = b; > M(T.extent(0),T.extent(1),T.extent(2),T.extent(3),FortranArray<4>()); M > = sum(T(o,p,t,r)*M_old(o,t,q,r),t); h = 1; > } > > Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm > >  > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > https://lists.sourceforge.net/lists/listinfo/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 Office: 125 PowellBooth 
From: roman binter <r.binter1@ls...>  20080527 12:47:00

Hi i am new to blitz and C++ so my question may be silly. I am trying to define a class performing matrix multiplication of 4 dimensional arrays. i try to declare a Fortran type array in the public part of my class. I want this array to catch the output of the matrix multiplication. The compiler complains. Could you please glance over my code snippet to see if there is anything obvious going wrong? cheers, roman class propagator { public: propagator(Array<double,4>, Array<double,4>); ColumnMajorArray<4> M; private: firstIndex o; secondIndex p; thirdIndex q; fourthIndex r; fifthIndex t; }; propagator::propagator(Array<double,4> a, Array<double,4> b){ Array<double,4> T = a; Array<double,4> M_old = b; M(T.extent(0),T.extent(1),T.extent(2),T.extent(3),FortranArray<4>()); M = sum(T(o,p,t,r)*M_old(o,t,q,r),t); h = 1; } Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm 
From: Patrik Jonsson <patrik@uc...>  20080525 05:27:47

Great, thanks! /Patrik On Sat, May 24, 2008 at 3:55 AM, Theodore Papadopoulo < Theodore.Papadopoulo@...> wrote: > Patrik Jonsson wrote: > > Hi all, > > > > I was getting another error in my code, and it also seems to be due to > > a bug in blitz introduced between May 2 and 3. I extracted the > > failing part into the following test program: > > > > #include "blitz/array.h" > > using namespace blitz; > > > > int main(int, char**) > > { > > Array<double,2> a(10,10); > > Array<double,1> d(sum(a,tensor::j)); > > > > } > I have found the problem. I'll push the correction later today as soon > as the testsuite benchmarks and examples finish running. > Of course, I have added a new test with your name in the testsuite ;) . > > Thank's for the report. > > Theo. > >  > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > https://lists.sourceforge.net/lists/listinfo/blitzsupport > 
From: Theodore Papadopoulo <Theodore.P<apadopoulo@so...>  20080524 10:55:53

Patrik Jonsson wrote: > Hi all, > > I was getting another error in my code, and it also seems to be due to > a bug in blitz introduced between May 2 and 3. I extracted the > failing part into the following test program: > > #include "blitz/array.h" > using namespace blitz; > > int main(int, char**) > { > Array<double,2> a(10,10); > Array<double,1> d(sum(a,tensor::j)); > > } I have found the problem. I'll push the correction later today as soon as the testsuite benchmarks and examples finish running. Of course, I have added a new test with your name in the testsuite ;) . Thank's for the report. Theo. 
From: Patrik Jonsson <patrik@uc...>  20080522 01:50:29

Hi all, I was getting another error in my code, and it also seems to be due to a bug in blitz introduced between May 2 and 3. I extracted the failing part into the following test program: #include "blitz/array.h" using namespace blitz; int main(int, char**) { Array<double,2> a(10,10); Array<double,1> d(sum(a,tensor::j)); } Running this on the CVS version of May 3 or later gives: [Blitz++] Precondition failure: Module /home/patrik/include/blitz/tinyvec.h line 280 TinyVector<b,1> index out of bounds: 4294967295 a.out: /home/patrik/include/blitz/tinyvec.h:280: bool blitz::TinyVector<P_numtype, N_length>::lengthCheck(unsigned int) const [with P_numtype = bool, int N_length = 1]: Assertion `0' failed. If the array is constructed before doing the sum, there is no error. It seems there is something wrong with detecting the shape of the expression, but I don't know where to look. It would be helpful if we augmented the test suite, as there seems to be quite a large number of errors that creep into the CVS version. Here's some test cases for various reductions with direct construction: int main(int, char**) { Array<double,2> a(3,3); a=1,1,2, 2,3,3, 2,2,1; Array<double,1> c(3); c=2,3,4; Array<double,1> res1(3); res1=4,8,5; Array<double,1> res2(3); res2=13,25,14; Array<double,1> res3(3); res3=8,24,20; //cout << Array<double,1>(sum(a,tensor::j)); assert(all(sum(a,tensor::j)==res1)); //cout << Array<double,1>(sum(a(tensor::i, tensor::j)*c(tensor::j),tensor::j)); assert(all(sum(a(tensor::i, tensor::j)*c(tensor::j),tensor::j)==res2)); //cout << Array<double,1>(sum(a(tensor::i, tensor::j),tensor::j)*c(tensor::i)); assert(all(sum(a(tensor::i, tensor::j),tensor::j)*c(tensor::i)==res3)); //cout << Array<double,1>(sum(a(tensor::i, tensor::j)*c(tensor::i),tensor::j)); assert(all(sum(a(tensor::i, tensor::j)*c(tensor::i),tensor::j)==res3)); } cheers, /Patrik 
From: Julian Cummings <cummings@ca...>  20080522 00:34:03

I see that you have errors related to the "min" and "max" functions. Try putting #define NOMINMAX at the head of your source code or in the blitz/ms/bzconfig.h file. This tells the MS compiler not to define its own min and max macros. This has been fixed in the development version of blitz. Regards, Julian C. Dr. Julian C. Cummings Staff Scientist, CACR/Caltech (626) 3952543 cummings@... _____ From: blitzsupportbounces@... [mailto:blitzsupportbounces@...] On Behalf Of JeanPhilippe Coutu Sent: Wednesday, May 21, 2008 6:53 AM To: blitzsupport@... Subject: [Blitzsupport] Problem compiling with blitz/array/ops.h Hi, I'm currently trying to rebuild a program one of my colleagues made using your blitz++ librairy. The main problem I have right now is that I can't compile because it produces multiple errors when it uses blitz/array/ops.h. I can't figure what the problem really is, since your librairy seems to work fine with the examples you provided with the latest version (0.9). I don't expect you to debug my program, but if you see something really apparent I'd really appreciate if you'd give me your thoughts on the matter. I'm using VS 2005 on Windows and I'm using the headers of your librairy directly and not the .lib generated once compiled. I'm joining the log. By the way, I haven't studied into programmation so my knowledge of C++ is somewhat limited. I'm not looking to modify the whole code my colleague made since it used to work; I'm only looking for a quick way to solve the problem since there must be one. Thanks a lot, JeanPhilippe Coutu _____ 
From: JeanPhilippe Coutu <jpcoutu@ho...>  20080521 13:53:01

ÿþ< 
From: xavier warin <xavier.warin@gm...>  20080519 16:55:32

Hi You can use boost (www.boost.org) with numutil : http://www.eos.ubc.ca/research/clouds/software/pythonlibs/num_util/num_util_release2/Readme.html Sincerely Xavier 2008/5/19 <Amit.Itagi@...>: > > Hi, > > I have a C++ program written with Blitz. I want to use a python function > (with numpy) to populate a Blitz array in my program. The array will be > shared by reference. I am a newbie as far as interfacing C++ and python > goes. Most of the literature is on trying to extend python using C++. Is > there some example that I can look at ? I have a feeling that, what I am > trying to do is something that is done routinely. > > Thanks > > Rgds, > Amit > > >  > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > https://lists.sourceforge.net/lists/listinfo/blitzsupport > 
From: Amit.I<tagi@se...>  20080519 13:37:01

Hi, I have a C++ program written with Blitz. I want to use a python function (with numpy) to populate a Blitz array in my program. The array will be shared by reference. I am a newbie as far as interfacing C++ and python goes. Most of the literature is on trying to extend python using C++. Is there some example that I can look at ? I have a feeling that, what I am trying to do is something that is done routinely. Thanks Rgds, Amit 
From: Volker Braun <vbraun@ph...>  20080514 17:01:46

gcc 4.3.0 warns about possible mistakes in && vs.  precedence if compiling with Wall, for example range.h:91: warning: suggest parentheses around && within  Whether one likes this warning or not, it would good to keep the compiler happy. This patch (on top of blitz CVS) adds extra parentheses, and gcc stops complaining. =================================================================== RCS file: /cvsroot/blitz/blitz/blitz/range.h,v retrieving revision 1.13 diff u r1.13 range.h  blitz/range.h 23 Apr 2008 02:38:35 0000 1.13 +++ blitz/range.h 14 May 2008 16:53:59 0000 @@ 89,8 +89,8 @@ : first_(first), last_(last), stride_(stride) { BZPRECHECK((first == fromStart)  (last == toEnd)   (first < last) && (stride > 0)   (first > last) && (stride < 0)  + ((first < last) && (stride > 0))  + ((first > last) && (stride < 0))  (first == last), (*this) << " is an invalid range."); BZPRECHECK((first == fromStart)  (last == toEnd)  (lastfirst) % stride == 0, @@ 124,13 +124,13 @@ bool isAscendingContiguous() const {  return ((first_ < last_) && (stride_ == 1)  (first_ == last_)); + return ( ((first_ < last_) && (stride_ == 1))  (first_ == last_)); } void setRange(T_numtype first, T_numtype last, T_numtype stride=1) {  BZPRECONDITION((first < last) && (stride > 0)   (first > last) && (stride < 0)  + BZPRECONDITION(((first < last) && (stride > 0))  + ((first > last) && (stride < 0))  (first == last)); BZPRECONDITION((lastfirst) % stride == 0); first_ = first; =================================================================== RCS file: /cvsroot/blitz/blitz/blitz/array/slicing.cc,v retrieving revision 1.12 diff u r1.12 slicing.cc  blitz/array/slicing.cc 17 Sep 2004 08:38:44 0000 1.12 +++ blitz/array/slicing.cc 14 May 2008 16:54:00 0000 @@ 325,8 +325,8 @@ #endif BZPRECHECK(  ((first <= last) && (stride > 0)   (first >= last) && (stride < 0)) + ( ((first <= last) && (stride > 0))  + ((first >= last) && (stride < 0)) ) && (first >= base(rank) && (first  base(rank)) < length_[rank]) && (last >= base(rank) && (last  base(rank)) < length_[rank]), "Bad array slice: Range(" << first << ", " << last << ", " 
From: incognito. me <incognito.me@gm...>  20080514 07:12:11

Hi everyone, I've read in the rubric *Platforms* that there was a support for VS .NET 2003 provided.Is there any support for Microsoft Visual C++ 2008? Thank you Cassandra  Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger 
From: Vukics Andras <andras.vukics@ui...>  20080512 20:24:58

Dear All, I have recently come across Blitz++, and it seems to be a solution for some of my problems. There are a few questions which sprang to my mind, and to which I could not find answers in the doc (I'm sorry if there is). (1) Is there a way to use Blitz++ to reference a const builtin array? In particular, I would like to wrap the ODE solvers of GSL. If you look at the function they need for calculating the derivative, you see that it has a const double* argument. I thought that an example code like double data[]={1,2,3,4}; const double* cdata=data; Array<const double,1> a(cdata,shape(4),neverDeleteData); might work, but it doesn't. It complains about uninitialized const in 'new' of 'const double' and assignment of readonly reference 'x' Of course I can always cast away the const, but it would be nice to have some other solution (something similar to const_multi_array_ref in BOOST). (2) Is there any guarantee that the data in an Array<std::complex<double>,N_rank> will be stored as a contiguous array of doubles with the real and imaginary parts alternating (I believe this is sometimes called a Complex Packed Array)? Otherwise I cannot see how an Array can be interfaced for LAPACK routines. Conversely, can an Array<std::complex<double>,N_rank> be initialized by a contiguous array of doubles, which is in fact a CPA? I have found a similar thread on blitzsupport from 2004 but it would be nice to see the current status of the problem. Best regards, Andras Vukics Dr. Andras Vukics Institute for Theoretical Physics University of Innsbruck 
From: Amit.I<tagi@se...>  20080512 13:28:26

Thanks, Julian. Rgds, Amit "Julian Cummings" <cummings@... ltech.edu> To Sent by: <blitzsupport@... blitzsupportbou t> nces@... cc forge.net No Phone Info Subject Available Re: [Blitzsupport] Stencil question 05/09/2008 02:17 PM Please respond to cummings@... tech.edu; Please respond to blitzsupport@... ts.sourceforge.ne t Amit, I believe that the stencil operator assumes that all the Arrays have the same rank. In that case, you will probably have to loop or iterate over slices of A and mtl explicitly and pass the slices into a 2D stencil. Regards, Julian C. Dr. Julian C. Cummings Staff Scientist, CACR/Caltech (626) 3952543 cummings@... > Original Message > From: blitzsupportbounces@... > [mailto:blitzsupportbounces@...] On > Behalf Of Amit.Itagi@... > Sent: Friday, May 09, 2008 10:29 AM > To: blitzsupport@... > Subject: Re: [Blitzsupport] Stencil question > > Julian, > > Your tips have been very handy in implementing my stencils. > However, I have on more question about stencils. Suppose I > want to do an operation such as > > A(Range::all(),J,K) = > c[mtl(Range::all(),J,K)]*(B(J+1,K)B(J1,K)+...), > where A is a 3D array, B is a 2D array with the shape same as > a slice of A, c is a material parameter global C array (as > discussed earlier), and mtl contains the 3D griddependent > material indices. Is there a way to implement this using > stencils ? What I really like about stencils is the extent > checking, and hopefully I can make use of that in this example. > > Thanks > > Rgds, > Amit  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Blitzsupport mailing list Blitzsupport@... https://lists.sourceforge.net/lists/listinfo/blitzsupport 
From: Fokko Beekhof <fpblists@gm...>  20080511 21:34:53

Dear Blitz++users, Please allow me to introduce CVMLCPP, a library that offers some nice features such as an easy frontend to the FFTW, convolution & correlation, but also a voxelizer. With minimal effort, it is usable with Blitz++: only some wrappers are needed. Example: #include <cassert> #include <algorithm> #include <base/BlitzArray> #include <signal/Fourier> using namespace cvmlcpp; // Have a blitz++ array blitz::Array<int, 3> a(3, 4, 5); std::fill(a.begin(), a.end(), 7); // Create a wrapper around "a" for cvmlcppcompatibility BlitzArray<int, 3> ba(a); assert( (3*4*5*7) == std::accumulate(ba.begin(), ba.end(), 0)); // Create output and a wrapper blitz::Array<std::complex<double>, 3> a_fft(3, 4, 5); BlitzArray<std::complex<double>, 3> ba_fft(a); // Compute 3DFourier tranform with "fftw" doDFT(ba, ba_ffft); The BlitzArray<..> class is usable as a regular blitz::Array, it is just a subclass providing some glue. The library has been tested with gcc 4.1 / 4.2 and blitz 0.9, all as provided on Ubuntu 8.04. Should you be interested, the CVMLCPP is available (under GPL) here: http://tech.unige.ch/cvmlcpp/ Documentation: http://tech.unige.ch/cvmlcpp/source/doc/ Specific information about the use of Blitz++ / CVMLCPP: http://tech.unige.ch/cvmlcpp/source/doc/BlitzArray.html A more extensive example can be found here: http://tech.unige.ch/cvmlcpp/source/testing/testBlitzArray.cc Of course I hope you find the CVMLCPP library useful, and if not, please do excuse the spam. Comments, suggestion, critique and patches are welcome, but please do understand that my time is somewhat limited. As usual, the use of this code is entirely on your own risk. Best regards, F. Beekhof P.S. Due to trouble with my emailclient, this message may appear twice. Sorry. 
From: Julian Cummings <cummings@ca...>  20080509 18:17:29

Amit, I believe that the stencil operator assumes that all the Arrays have the same rank. In that case, you will probably have to loop or iterate over slices of A and mtl explicitly and pass the slices into a 2D stencil. Regards, Julian C. Dr. Julian C. Cummings Staff Scientist, CACR/Caltech (626) 3952543 cummings@... > Original Message > From: blitzsupportbounces@... > [mailto:blitzsupportbounces@...] On > Behalf Of Amit.Itagi@... > Sent: Friday, May 09, 2008 10:29 AM > To: blitzsupport@... > Subject: Re: [Blitzsupport] Stencil question > > Julian, > > Your tips have been very handy in implementing my stencils. > However, I have on more question about stencils. Suppose I > want to do an operation such as > > A(Range::all(),J,K) = > c[mtl(Range::all(),J,K)]*(B(J+1,K)B(J1,K)+...), > where A is a 3D array, B is a 2D array with the shape same as > a slice of A, c is a material parameter global C array (as > discussed earlier), and mtl contains the 3D griddependent > material indices. Is there a way to implement this using > stencils ? What I really like about stencils is the extent > checking, and hopefully I can make use of that in this example. > > Thanks > > Rgds, > Amit 
From: Amit.I<tagi@se...>  20080509 17:42:29

Julian, Your tips have been very handy in implementing my stencils. However, I have on more question about stencils. Suppose I want to do an operation such as A(Range::all(),J,K) = c[mtl(Range::all(),J,K)]*(B(J+1,K)B(J1,K)+...), where A is a 3D array, B is a 2D array with the shape same as a slice of A, c is a material parameter global C array (as discussed earlier), and mtl contains the 3D griddependent material indices. Is there a way to implement this using stencils ? What I really like about stencils is the extent checking, and hopefully I can make use of that in this example. Thanks Rgds, Amit Julian Cummings <cummings@... ltech.edu> To Sent by: blitzsupport@... blitzsupportbou cc nces@... forge.net Subject No Phone Info Re: [Blitzsupport] Stencil Available question 05/06/2008 08:39 PM Please respond to blitzsupport@... ts.sourceforge.ne t Hello Amit, It sounds like what you want is to have a griddependent material id array and then use that id number to index into material dependent parameter arrays within a stencil operation. I think you could do this if you were willing to expose the pointers to the material dependent parameter data arrays as global data. For example, if c is an ordinary C array of material dependent parameter values, then you could say BZ_DECLARE_STENCIL4(acoustic3D_stencil,P1,P2,P3,mtl) P3 = 2 * P2 + c[mtl] * Laplacian3D(P2)  P1; BZ_END_STENCIL Have you tried doing something like this?  Julian C. On Tue, 20080506 at 14:19 0400, Amit.Itagi@... wrote: > Hi, > > I am trying to implement a finite difference scheme. From the Blitz > documentation, I get the following > > Suppose we wanted to implement the 3D acoustic wave equation using finite > differencing. Here is how a single iteration would look using subarray > syntax: > > > > Range I(1,N2), J(1,N2), K(1,N2); > > P3(I,J,K) = (26*c(I,J,K)) * P2(I,J,K) > + c(I,J,K)*(P2(I1,J,K) + P2(I+1,J,K) + P2(I,J1,K) + P2(I,J+1,K) > + P2(I,J,K1) + P2(I,J,K+1))  P1(I,J,K); > > > > > > > > This syntax is a bit klunky. With stencil objects, the implementation > becomes: > > > > BZ_DECLARE_STENCIL4(acoustic3D_stencil,P1,P2,P3,c) > P3 = 2 * P2 + c * Laplacian3D(P2)  P1; > BZ_END_STENCIL > > . > . > > applyStencil(acoustic3D_stencil(), P1, P2, P3, c); > > > > > > Suppose, one of the parameters eg. c(I,J,K) is material dependent. Since, I > might have several such parameters, but only a few materials, it seems > unreasonable to have an array to store the parameter c for the entire > computational space. It might be more reasonable to store an array that > represents the material number, and then have a look up for the material > dependent parameters. Is there a way to implement this ? > > eg: > > c(I,J,K) > c(mtl(I,J,K)) > > > Thanks > > Rgds, > Amit > > >  > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > https://lists.sourceforge.net/lists/listinfo/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 Office: 125 PowellBooth  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Blitzsupport mailing list Blitzsupport@... https://lists.sourceforge.net/lists/listinfo/blitzsupport 
From: Theodore Papadopoulo <Theodore.P<apadopoulo@so...>  20080507 21:41:50

Patrik Jonsson wrote: > On Wed, May 7, 2008 at 2:42 AM, Theodore Papadopoulo > <Theodore.Papadopoulo@... > <mailto:Theodore.Papadopoulo@...>> wrote: > > Patrik Jonsson wrote: > > Hi again, > > sorry to be spamming the list, but it does indeed work to just make > > the functorExpr methods constant, as in: > > God, another one that I missed. Sorry for the annoyance. I'll fix that > immediately. Your fix is basically OK, I will just > add some more consts (inside the parentheses). > > > Perfect, thanks. > > > > > The testsuite and benchmark do not cover many features it seems. Would > you mind if I add your example code to the testsuite ? > > > Not at all, that was kind of the intent. I'm not sure exactly how the > testsuite programs are written though, I looked briefly and saw use of > some BZTEST or similar macros. If you can turn it into a real testcase > easily, please go ahead. The fix and the testcase are committed now... Thank's for pointing out the problem. Theo. 
From: Patrik Jonsson <patrik@uc...>  20080507 16:55:05

On Wed, May 7, 2008 at 2:42 AM, Theodore Papadopoulo < Theodore.Papadopoulo@...> wrote: > Patrik Jonsson wrote: > > Hi again, > > sorry to be spamming the list, but it does indeed work to just make > > the functorExpr methods constant, as in: > > God, another one that I missed. Sorry for the annoyance. I'll fix that > immediately. Your fix is basically OK, I will just > add some more consts (inside the parentheses). Perfect, thanks. > > > The testsuite and benchmark do not cover many features it seems. Would > you mind if I add your example code to the testsuite ? Not at all, that was kind of the intent. I'm not sure exactly how the testsuite programs are written though, I looked briefly and saw use of some BZTEST or similar macros. If you can turn it into a real testcase easily, please go ahead. cheers, /Patrik > > Regards, > > Theo. > > > > Index: blitz/array/functorExpr.h > > =================================================================== > > RCS file: /cvsroot/blitz/blitz/blitz/array/functorExpr.h,v > > retrieving revision 1.8 > > diff r1.8 functorExpr.h > > 149c149 > > < int ascending(int rank) > >  > > > int ascending(int rank) const > > 152c152 > > < int ordering(int rank) > >  > > > int ordering(int rank) const > > 155c155 > > < int lbound(int rank) > >  > > > int lbound(int rank) const > > 158c158 > > < int ubound(int rank) > >  > > > int ubound(int rank) const > > > > May I suggest we add a test case for this too, since there's > > apparently none using BZ_DECLARE_MEMBER_FUNCTION_RETOh > >  > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > https://lists.sourceforge.net/lists/listinfo/blitzsupport > 
From: Amit.I<tagi@se...>  20080507 14:51:07

My bad. "val" in my piece of code is not global. If I make it global, the program works. On a different note, what do I do if I want something like b=val[mtl]*a ? Thanks Rgds, Amit Amit.Itagi@... e.com Sent by: To blitzsupportbou blitzsupport@... nces@... cc forge.net 4129187237 Subject Re: [Blitzsupport] Stencil question 05/07/2008 10:19 AM Please respond to blitzsupport@... ts.sourceforge.ne t Julian, I tried to implement a simple example based on your reply. It does not compile. Could you take a look ? Code: #include <iostream> #include <blitz/array.h> #include <blitz/tinyvecet.h> using namespace blitz; using namespace std; /* // A standard stencil example BZ_DECLARE_STENCIL2(myTest1,a,b) b=(a(0,0)+a(0,1),a(0,1)+a(1,0)+a(1,0)); BZ_END_STENCIL */ // A stencil used for griddependent material BZ_DECLARE_STENCIL4(myTest2,a,b,mtl,val) b=val[mtl]*(a(0,0)+a(0,1),a(0,1)+a(1,0)+a(1,0)); BZ_END_STENCIL int main() { // Data arrays Array<float,2> a(5,5), b(5,5); // Material indices Array<int,2> mtl(5,5); // Material dependent data (Two materials) float val[2]; val[0]=1.0; val[1]=1.0; // Initialize grid material info mtl=0; mtl(Range(1,3),Range(1,3))=1; // Initialize data a=1.0; b=0.0; // Apply stencil applyStencil(myTest2(),a,b,mtl,val); // Write put data int ii, jj; for(ii=0; ii<5; ii++) for(jj=0; jj<5; jj++) cout << ii << " " << jj << "\t" << b(ii,jj) << endl; return 0; } Compiler says: (sorry, some garbled characters got introduced while pasting the log) /home/amit/packages/blitz/include/blitz/array/stencils.cc: In function â€˜void blitz::applyStencil_imp(const T_stencil&, blitz::Array<T_numtype1, 2>&, T_array2&, T_array3&, T_array4&, T_array5&, T_array6&, T_array7&, T_array8&, T_array9&, T_array10&, T_array11&) [with T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™: /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.h: In member function â€˜typename blitz::multicomponent_traits<P_numtype>::T_element blitz::dummy<T>::operator[](int) const [with T = double]â€™: main.cpp:17: instantiated from â€˜static void myTest2::apply(T1&, T2&, T3&, T4&, T5, T6, T7, T8, T9, T10, T11) [with T1 = blitz::stencilExtent<2, float>, T2 = blitz::stencilExtent<2, float>, T3 = blitz::stencilExtent<2, int>, 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>]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:106: 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<2, float>, int N_rank = 2, T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:154: 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 = 2, T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:188: 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 = 2, T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:317: instantiated from â€˜void blitz::applyStencil_imp(const T_stencil&, blitz::Array<T_numtype1, 2>&, T_array2&, T_array3&, T_array4&, T_array5&, T_array6&, T_array7&, T_array8&, T_array9&, T_array10&, T_array11&) [with T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.h:183: error: subscripted value is neither array nor pointer Thanks Rgds, Amit Julian Cummings <cummings@... ltech.edu> To Sent by: blitzsupport@... blitzsupportbou cc nces@... forge.net Subject No Phone Info Re: [Blitzsupport] Stencil Available question 05/06/2008 08:39 PM Please respond to blitzsupport@... ts.sourceforge.ne t Hello Amit, It sounds like what you want is to have a griddependent material id array and then use that id number to index into material dependent parameter arrays within a stencil operation. I think you could do this if you were willing to expose the pointers to the material dependent parameter data arrays as global data. For example, if c is an ordinary C array of material dependent parameter values, then you could say BZ_DECLARE_STENCIL4(acoustic3D_stencil,P1,P2,P3,mtl) P3 = 2 * P2 + c[mtl] * Laplacian3D(P2)  P1; BZ_END_STENCIL Have you tried doing something like this?  Julian C. On Tue, 20080506 at 14:19 0400, Amit.Itagi@... wrote: > Hi, > > I am trying to implement a finite difference scheme. From the Blitz > documentation, I get the following > > Suppose we wanted to implement the 3D acoustic wave equation using finite > differencing. Here is how a single iteration would look using subarray > syntax: > > > > Range I(1,N2), J(1,N2), K(1,N2); > > P3(I,J,K) = (26*c(I,J,K)) * P2(I,J,K) > + c(I,J,K)*(P2(I1,J,K) + P2(I+1,J,K) + P2(I,J1,K) + P2(I,J+1,K) > + P2(I,J,K1) + P2(I,J,K+1))  P1(I,J,K); > > > > > > > > This syntax is a bit klunky. With stencil objects, the implementation > becomes: > > > > BZ_DECLARE_STENCIL4(acoustic3D_stencil,P1,P2,P3,c) > P3 = 2 * P2 + c * Laplacian3D(P2)  P1; > BZ_END_STENCIL > > . > . > > applyStencil(acoustic3D_stencil(), P1, P2, P3, c); > > > > > > Suppose, one of the parameters eg. c(I,J,K) is material dependent. Since, I > might have several such parameters, but only a few materials, it seems > unreasonable to have an array to store the parameter c for the entire > computational space. It might be more reasonable to store an array that > represents the material number, and then have a look up for the material > dependent parameters. Is there a way to implement this ? > > eg: > > c(I,J,K) > c(mtl(I,J,K)) > > > Thanks > > Rgds, > Amit > > >  > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > https://lists.sourceforge.net/lists/listinfo/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 Office: 125 PowellBooth  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Blitzsupport mailing list Blitzsupport@... https://lists.sourceforge.net/lists/listinfo/blitzsupport  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Blitzsupport mailing list Blitzsupport@... https://lists.sourceforge.net/lists/listinfo/blitzsupport 
From: Amit.I<tagi@se...>  20080507 14:29:31

Julian, I tried to implement a simple example based on your reply. It does not compile. Could you take a look ? Code: #include <iostream> #include <blitz/array.h> #include <blitz/tinyvecet.h> using namespace blitz; using namespace std; /* // A standard stencil example BZ_DECLARE_STENCIL2(myTest1,a,b) b=(a(0,0)+a(0,1),a(0,1)+a(1,0)+a(1,0)); BZ_END_STENCIL */ // A stencil used for griddependent material BZ_DECLARE_STENCIL4(myTest2,a,b,mtl,val) b=val[mtl]*(a(0,0)+a(0,1),a(0,1)+a(1,0)+a(1,0)); BZ_END_STENCIL int main() { // Data arrays Array<float,2> a(5,5), b(5,5); // Material indices Array<int,2> mtl(5,5); // Material dependent data (Two materials) float val[2]; val[0]=1.0; val[1]=1.0; // Initialize grid material info mtl=0; mtl(Range(1,3),Range(1,3))=1; // Initialize data a=1.0; b=0.0; // Apply stencil applyStencil(myTest2(),a,b,mtl,val); // Write put data int ii, jj; for(ii=0; ii<5; ii++) for(jj=0; jj<5; jj++) cout << ii << " " << jj << "\t" << b(ii,jj) << endl; return 0; } Compiler says: (sorry, some garbled characters got introduced while pasting the log) /home/amit/packages/blitz/include/blitz/array/stencils.cc: In function â€˜void blitz::applyStencil_imp(const T_stencil&, blitz::Array<T_numtype1, 2>&, T_array2&, T_array3&, T_array4&, T_array5&, T_array6&, T_array7&, T_array8&, T_array9&, T_array10&, T_array11&) [with T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™: /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.cc:344: error: â€˜float [2]â€™ is not a class, struct, or union type /home/amit/packages/blitz/include/blitz/array/stencils.h: In member function â€˜typename blitz::multicomponent_traits<P_numtype>::T_element blitz::dummy<T>::operator[](int) const [with T = double]â€™: main.cpp:17: instantiated from â€˜static void myTest2::apply(T1&, T2&, T3&, T4&, T5, T6, T7, T8, T9, T10, T11) [with T1 = blitz::stencilExtent<2, float>, T2 = blitz::stencilExtent<2, float>, T3 = blitz::stencilExtent<2, int>, 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>]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:106: 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<2, float>, int N_rank = 2, T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:154: 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 = 2, T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:188: 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 = 2, T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:317: instantiated from â€˜void blitz::applyStencil_imp(const T_stencil&, blitz::Array<T_numtype1, 2>&, T_array2&, T_array3&, T_array4&, T_array5&, T_array6&, T_array7&, T_array8&, T_array9&, T_array10&, T_array11&) [with T_stencil = myTest2, T_numtype1 = float, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2], 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]â€™ /home/amit/packages/blitz/include/blitz/array/stencils.cc:528: instantiated from â€˜void blitz::applyStencil(const T_stencil&, blitz::Array<T_numtype1, N_rank>&, T_array2&, T_array3&, T_array4&) [with T_stencil = myTest2, T_numtype1 = float, int N_rank = 2, T_array2 = blitz::Array<float, 2>, T_array3 = blitz::Array<int, 2>, T_array4 = float [2]]â€™ main.cpp:42: instantiated from here /home/amit/packages/blitz/include/blitz/array/stencils.h:183: error: subscripted value is neither array nor pointer Thanks Rgds, Amit Julian Cummings <cummings@... ltech.edu> To Sent by: blitzsupport@... blitzsupportbou cc nces@... forge.net Subject No Phone Info Re: [Blitzsupport] Stencil Available question 05/06/2008 08:39 PM Please respond to blitzsupport@... ts.sourceforge.ne t Hello Amit, It sounds like what you want is to have a griddependent material id array and then use that id number to index into material dependent parameter arrays within a stencil operation. I think you could do this if you were willing to expose the pointers to the material dependent parameter data arrays as global data. For example, if c is an ordinary C array of material dependent parameter values, then you could say BZ_DECLARE_STENCIL4(acoustic3D_stencil,P1,P2,P3,mtl) P3 = 2 * P2 + c[mtl] * Laplacian3D(P2)  P1; BZ_END_STENCIL Have you tried doing something like this?  Julian C. On Tue, 20080506 at 14:19 0400, Amit.Itagi@... wrote: > Hi, > > I am trying to implement a finite difference scheme. From the Blitz > documentation, I get the following > > Suppose we wanted to implement the 3D acoustic wave equation using finite > differencing. Here is how a single iteration would look using subarray > syntax: > > > > Range I(1,N2), J(1,N2), K(1,N2); > > P3(I,J,K) = (26*c(I,J,K)) * P2(I,J,K) > + c(I,J,K)*(P2(I1,J,K) + P2(I+1,J,K) + P2(I,J1,K) + P2(I,J+1,K) > + P2(I,J,K1) + P2(I,J,K+1))  P1(I,J,K); > > > > > > > > This syntax is a bit klunky. With stencil objects, the implementation > becomes: > > > > BZ_DECLARE_STENCIL4(acoustic3D_stencil,P1,P2,P3,c) > P3 = 2 * P2 + c * Laplacian3D(P2)  P1; > BZ_END_STENCIL > > . > . > > applyStencil(acoustic3D_stencil(), P1, P2, P3, c); > > > > > > Suppose, one of the parameters eg. c(I,J,K) is material dependent. Since, I > might have several such parameters, but only a few materials, it seems > unreasonable to have an array to store the parameter c for the entire > computational space. It might be more reasonable to store an array that > represents the material number, and then have a look up for the material > dependent parameters. Is there a way to implement this ? > > eg: > > c(I,J,K) > c(mtl(I,J,K)) > > > Thanks > > Rgds, > Amit > > >  > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > https://lists.sourceforge.net/lists/listinfo/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 Office: 125 PowellBooth  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Blitzsupport mailing list Blitzsupport@... https://lists.sourceforge.net/lists/listinfo/blitzsupport 
From: Theodore Papadopoulo <Theodore.P<apadopoulo@so...>  20080507 09:42:06

Patrik Jonsson wrote: > Hi again, > sorry to be spamming the list, but it does indeed work to just make > the functorExpr methods constant, as in: God, another one that I missed. Sorry for the annoyance. I'll fix that immediately. Your fix is basically OK, I will just add some more consts (inside the parentheses). The testsuite and benchmark do not cover many features it seems. Would you mind if I add your example code to the testsuite ? Regards, Theo. > > Index: blitz/array/functorExpr.h > =================================================================== > RCS file: /cvsroot/blitz/blitz/blitz/array/functorExpr.h,v > retrieving revision 1.8 > diff r1.8 functorExpr.h > 149c149 > < int ascending(int rank) >  > > int ascending(int rank) const > 152c152 > < int ordering(int rank) >  > > int ordering(int rank) const > 155c155 > < int lbound(int rank) >  > > int lbound(int rank) const > 158c158 > < int ubound(int rank) >  > > int ubound(int rank) const > > May I suggest we add a test case for this too, since there's > apparently none using BZ_DECLARE_MEMBER_FUNCTION_RETOh 
From: Theodore Papadopoulo <Theodore.P<apadopoulo@so...>  20080507 09:38:58

Patrik Jonsson wrote: > First, are the Array iterators randomaccess iterators? I seem to > remember them only being forward iterators. It seems nth_element would > need randomaccess ones? No, I'm working to have those (for now I have a first design that seems to work with positive increments but not yet for negative ones). My goal here is to ease blitz usage with OpenMP. The current iterators are bidirectional_iterators. And yes, as far as I can tell, nthelement needs for a ramdomaccess iterator, so I do not know how this test was run. Which compiler, standard c++ library version. gcc implementation seems to have checks for random_iterators (just seen the code haven't checked whether the check is effective or not). That being said, a quick check throught the implementation seems to indicate that only increment and decrement of iterators are used.... Finally, operator for blitz iterator are fairly new, so there might be a bug lurking around. swap is indeed another candidate. There has been problems in blitz with swap for arrays. This very well migt be a similar problems with blitz iterators. I'll have a look at the testcase when I have time, which is probably during the weekend. Thank's for the report... Theo. 
From: Julian Cummings <cummings@ca...>  20080507 00:39:39

Hello Amit, It sounds like what you want is to have a griddependent material id array and then use that id number to index into material dependent parameter arrays within a stencil operation. I think you could do this if you were willing to expose the pointers to the material dependent parameter data arrays as global data. For example, if c is an ordinary C array of material dependent parameter values, then you could say BZ_DECLARE_STENCIL4(acoustic3D_stencil,P1,P2,P3,mtl) P3 = 2 * P2 + c[mtl] * Laplacian3D(P2)  P1; BZ_END_STENCIL Have you tried doing something like this?  Julian C. On Tue, 20080506 at 14:19 0400, Amit.Itagi@... wrote: > Hi, > > I am trying to implement a finite difference scheme. From the Blitz > documentation, I get the following > > Suppose we wanted to implement the 3D acoustic wave equation using finite > differencing. Here is how a single iteration would look using subarray > syntax: > > > > Range I(1,N2), J(1,N2), K(1,N2); > > P3(I,J,K) = (26*c(I,J,K)) * P2(I,J,K) > + c(I,J,K)*(P2(I1,J,K) + P2(I+1,J,K) + P2(I,J1,K) + P2(I,J+1,K) > + P2(I,J,K1) + P2(I,J,K+1))  P1(I,J,K); > > > > > > > > This syntax is a bit klunky. With stencil objects, the implementation > becomes: > > > > BZ_DECLARE_STENCIL4(acoustic3D_stencil,P1,P2,P3,c) > P3 = 2 * P2 + c * Laplacian3D(P2)  P1; > BZ_END_STENCIL > > . > . > > applyStencil(acoustic3D_stencil(), P1, P2, P3, c); > > > > > > Suppose, one of the parameters eg. c(I,J,K) is material dependent. Since, I > might have several such parameters, but only a few materials, it seems > unreasonable to have an array to store the parameter c for the entire > computational space. It might be more reasonable to store an array that > represents the material number, and then have a look up for the material > dependent parameters. Is there a way to implement this ? > > eg: > > c(I,J,K) > c(mtl(I,J,K)) > > > Thanks > > Rgds, > Amit > > >  > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Blitzsupport mailing list > Blitzsupport@... > https://lists.sourceforge.net/lists/listinfo/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 Office: 125 PowellBooth 
From: Patrik Jonsson <patrik@uc...>  20080506 23:08:42

Hi again, sorry to be spamming the list, but it does indeed work to just make the functorExpr methods constant, as in: Index: blitz/array/functorExpr.h =================================================================== RCS file: /cvsroot/blitz/blitz/blitz/array/functorExpr.h,v retrieving revision 1.8 diff r1.8 functorExpr.h 149c149 < int ascending(int rank)  > int ascending(int rank) const 152c152 < int ordering(int rank)  > int ordering(int rank) const 155c155 < int lbound(int rank)  > int lbound(int rank) const 158c158 < int ubound(int rank)  > int ubound(int rank) const May I suggest we add a test case for this too, since there's apparently none using BZ_DECLARE_MEMBER_FUNCTION_RET #include <iostream> #include "blitz/array.h" using namespace blitz; class crap { public: double a(double x) const {return 2*x;}; BZ_DECLARE_MEMBER_FUNCTION_RET(crap, a, double); }; int main(int, char**) { crap c; Array<double,1> lam(10); lam=1.,2.,3.,4.,5.,6.,7.,8.,9.,10.; Array<double,1> a(c.a(lam)); std::cout << a << std::endl; for(int i=0; i<10; ++i) if(a(i)!=2*lam(i)) { std::cerr << "Failed" << std::endl; exit(1); } std::cerr << "Passed" << std::endl; exit(0); } cheers, /Patrik On Tue, May 6, 2008 at 3:46 PM, Patrik Jonsson <patrik@...> wrote: > One additional piece of info: the change that introduced the error was > made between 5/2 and 5/3. But there were a bunch of changes made then, so > it's hard to say which. In particular, there were major changes to expr.h by > "papadop". The log entry says "...constified some code related to > reductions", and the methods ascending/ordering/lbound/ubound were indeed > made const then, so that seems likely to be the problem. > > Is the solution to make the corresponding methods in FunctorExpr const > too? > > Regards, > > /Patrik > > > > 