Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Any Generic ET framework?

Reply
Thread Tools

Any Generic ET framework?

 
 
Ben
Guest
Posts: n/a
 
      07-06-2004
Hi,

I was writing a expression template for string concatenation latetly.

When writing it, I started to feel curious that why there's not any
generic et lib that can save me from wring each different et lib from
scratch. Or, maybe I was just ignorant and there is some already?

matrix, string, array, vector, whatever, the idea of et is quite
similar. We need a leaf node and a binary non-leaf node for expressing
the expression syntax tree; We need to overload some operators; We
need to broadcast certain functor object recursively to all leaf
nodes, etc.
And there can be many generic tasks that are not specific to matrix or
string at all. (say, find out how many leaf nodes in the tree, or find
out the type of or reference to the #i leaf node, etc.)

And we shouldn't be writing such kind of code over and over again for
different things that we want to make lazy, should we?

So, I started writing my own generic et framework. And using this
framework, I have created my string concatenation for string, const
char*, const char[k], CString. They can even be mixed.
Each different type just needs to specialize a few classes to use this
framework.

Code using this framework can look like:
string str = "world";
CString cstr = "...";
string s = et + "hello" + " " + str + cstr + "!";


But before I start writing my next et, (I'm thinking about using it to
apply MCM algorithm for matrixes), I want to make sure that I'm not
doing anything that has been done well in another lib.

So, the question is: is there anything out there that has already does
so?

Can I simply customize an existing generic et lib to optimize my
string concatenation for string, CString, MyString etc?


Ben.
 
Reply With Quote
 
 
 
 
Jonathan Turkanis
Guest
Posts: n/a
 
      07-06-2004

"Ben" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi,
>
> I was writing a expression template for string concatenation

latetly.
>
> When writing it, I started to feel curious that why there's not any
> generic et lib that can save me from wring each different et lib

from
> scratch. Or, maybe I was just ignorant and there is some already?
>


There is Daixtrose: http://daixtrose.sourceforge.net/.

I can't say whether it is any good, but you might want to check it
out. Markus Werle has talked about submitting it to boost.

Jonathan


 
Reply With Quote
 
 
 
 
tom_usenet
Guest
Posts: n/a
 
      07-06-2004
On 5 Jul 2004 23:26:33 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (Ben) wrote:

>Hi,
>
>I was writing a expression template for string concatenation latetly.
>
>When writing it, I started to feel curious that why there's not any
>generic et lib that can save me from wring each different et lib from
>scratch. Or, maybe I was just ignorant and there is some already?


There are several of them!

http://daixtrose.sourceforge.net/ (which sounds like a sugar)

This was the first one I think, from many years back:
http://acts.nersc.gov/pete/ (which sounds like a mate down the pub)

Tom
--
C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
 
Reply With Quote
 
Thomas Matthews
Guest
Posts: n/a
 
      07-06-2004
Ben wrote:
> Hi,
>
> I was writing a expression template for string concatenation latetly.
>
> When writing it, I started to feel curious that why there's not any
> generic et lib that can save me from wring each different et lib from
> scratch. Or, maybe I was just ignorant and there is some already?

What is ET an abbreviation for?

[snip]
>
> But before I start writing my next et, (I'm thinking about using it to
> apply MCM algorithm for matrixes), I want to make sure that I'm not
> doing anything that has been done well in another lib.

What is MCM?

[snip]

>
>
> Ben.


When posting to an international newsgroup that has a wide audience,
please either refrain from the abbreviations or define them before
you use them, such as:
I need help with Binary Tree Search (BTS) algorithm....

Don't assume any knowledge, except standard C++, from your
target audience in this newsgroup.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

 
Reply With Quote
 
Ben
Guest
Posts: n/a
 
      07-06-2004
>
> When posting to an international newsgroup that has a wide audience,
> please either refrain from the abbreviations or define them before
> you use them, such as:
> I need help with Binary Tree Search (BTS) algorithm....
>
> Don't assume any knowledge, except standard C++, from your
> target audience in this newsgroup.
>

Sorry for that.
ET stands for "expression template".

MCM stands for "Matrix-chain multiplication". I was trying to give the
full name for this, it is just that I forgot the full name when
posting. :->
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
not just generic type programming,but also parallism generic syntaxprogramming?? minlearn C++ 2 03-13-2009 05:17 PM
generic interfaces with generic methods Murat Tasan Java 1 02-03-2009 12:17 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Generic class in a non generic class nramnath@gmail.com Java 2 07-04-2006 07:24 AM
generic Java servlet calendar backend, any available? Asger Jensen Java 0 09-17-2003 10:56 AM



Advertisments