|Re: [eigen] Maximum size at compile time|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Maximum size at compile time
- From: Adrien Escande <adrien.escande@xxxxxxxxx>
- Date: Thu, 17 May 2018 22:01:50 +0900
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=p8sDaDnpAHeRGoN7S6SrMBKn2E63LbrKNmPMgANGTXw=; b=iSi8SJDhi39ulFYxjxmaH7oYIoQRlTWbYitJUAHEcwUZwOhfSwwiDAg2L85yUUyB42 s25dDckDpJTFFYxV53UFF25h6K4BQc5XNUzJpEbNxyw/TNgkWxqw9+B7uKzWdQmK5kai zp2Li8eGsyPaYKN1VSpe16FVMwL6gvI8yNqWus2Q5aiXTrPT1TK00J7LJF2AbHr/tAuV xlfengR6jW666mW+i44JHGSjOV4wPm5eUxqXZIZHb+kmjV+lse9Ar/tqTJE4x0kmDVqj cJgW9n3ACNpXKjgWaXVYpGAYcdtJC6ucHrR48cO46pKyV0mA4XLbZqQS4zrvWfaPd8uc gWOw==
we have the same issue in our lab, and each time I start a new project I kick myself for not pushing this feature during the Eigen3 beta.
The use of Map is not really satisfactory and error prone. Most critically, there is no workaround for matrix decompositions, for which there will be reallocation whenever the size of the matrix changes.
Basically, there would be a need of a memory management mode in which a reallocation occurs only if the new buffer needs to be bigger than the current one. For now, the size of the buffer is supposed to be row()*cols(), so we would need an additional integer to keep track of the buffer size separately from the matrix size, which would break the ABI.
Maybe we could try to put it back on rail.