Re: [eigen] Malloc-free dynamic matrices |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Malloc-free dynamic matrices
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 4 Mar 2010 23:15:24 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Hcewlc2dbpamrA2/QKlibHdu78Ys2UMtwTLJAot6wrw=; b=xEYviwpunHaYjOhYVgkw+C9tr3nhSnuaJ/CDHMBrWoKtBRDfyfvVDR2KXi2NIfVTd4 XztYrpq2eGy7yFNpzI1xo9W3Gl/YWrx6MjH4J5gwf51mtFztaWGBk9XTYOgrJlJlsAU3 vrdFQrXgzfH2EUmQ6VDut6pPlk+ySqQ+G0QqY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=GZVrT9YvWpHt1jkpERAblAlwk/3CKeg9ENJl5YUxVZf22/ZqhA2zzKsotYr2GERE8y LRQEk6WMxFYU1VL5s5sVkdE7/w7/JhIRSGbzt3VAp1KQYi8GTw4tx76S+31mwCHabm9c ObrNCgXNlwKHlDgJDP4iN7SIO+RBH56fjYua8=
ok first of all let me say that the more time passes the more i find
attractive the idea of saying "Let's just decide now what the data
members of class Matrix are for all of Eigen 3.x and if people need
more data members in the future let them just write a new separate
class or a new Option (template parameter) to Matrix". In other words,
just brush the problem away, so, if you want, we add this
allocatedSize member now, but after that, basta. "Le mieux est
l'ennemi du bien", i.e. "Best is the enemy of Good"
Now....
i haven't been able to help it, i've experimented ...mentally... with
d-pointers-without-a-binary-lib, as I said before this boils down to
doing versioning of stuff across different translation units.
Proof-of-concept:
inline int maxEigenVersion()
{
static int result = 0;
result = std::max(result, EIGEN_VERSION_AS_INT);
return result;
}
Now EIGEN_VERSION_AS_INT could be 30405 in Eigen 3.4.5, etc...
Result: if two files A and B call this function, then any subsequent
call to this function will return the max of the Eigen versions that
they use.