[eigen] writing a function that takes Eigen::MatrixBase or Eigen::Block

2019-10-02 Thread Dale Lukas Peterson
Following the guidance here [0], I have:

template 
void test(const Eigen::MatrixBase& a)
{
  // Use case 1:
  Derived aa;
  // do stuff with aa

  // Use case 2:
  Derived bb = a;
  // do stuff with bb
}

If I create an Eigen::Matrix and call test like so, it works fine:

Eigen::Matrix A;
A << 1, 2, 3, 4,
5, 6, 7, 8;
// Works
test(A);

However, the following doesn't work:
test(A.block<2, 1>(0, 1));

However, the following does work:
test(A.block<2, 1>(0, 1).eval());

Is .eval() the right approach here? Should I being doing something else at
the call site, or in my function definition to better handle this? Does the
return value of `.block<2, 1>(0, 1)` constitute a "plain matrix or vector
(not an expression)" [1] or not, so that I can be certain this isn't
creating a useless copy?

Sincerely,
Luke

[0] https://eigen.tuxfamily.org/dox/TopicFunctionTakingEigenTypes.html
[1] https://eigen.tuxfamily.org/dox/classEigen_1_1DenseBase.html#title39


Re: [eigen] Bitbucket migration

2019-10-02 Thread Gael Guennebaud
Hi,

yes, I've already found this email, and sent him a message on the 6th of
September and a reminder on the 17th. But no reply.

gael

On Wed, Oct 2, 2019 at 11:00 PM Rasmus Munk Larsen 
wrote:

> It looks like the person's work email might be found here:
> https://www.ht.sfc.keio.ac.jp/~eigen/
> Gael or Christoph, would you consider contacting them directly?
>
> On Wed, Oct 2, 2019 at 1:56 PM David Tellenbach <
> david.tellenb...@tellnotes.org> wrote:
>
>> Hi all,
>>
>> It also looks like there has been no activity for 10 months on that
>> account:
>>
>> https://gitlab.com/users/eigen/activity
>>
>>
>> This doesn't seem to be enough:
>> https://about.gitlab.com/support/#dormant-namespace-requests states that
>> two years of inactivity are required. However, it's always possible to ask.
>>
>> David
>>
>>
>> On 2. Oct 2019, at 22:47, Rasmus Munk Larsen  wrote:
>>
>> It also looks like there has been no activity for 10 months on that
>> account:
>>
>> https://gitlab.com/users/eigen/activity
>>
>> On Tue, Oct 1, 2019 at 4:26 PM Patrik Huber 
>> wrote:
>>
>>> Hi Gael,
>>>
>>> >> since "eigen" is already taken (and I got no answer from the owner
>>> despite one reminder)
>>>
>>> Have you contacted GitLab support about this? They're usually quite
>>> responsive. Eigen is a project with quite some weight behind it, it may not
>>> be unlikely that they can do something.
>>>
>>> -Patrik
>>>
>>> On Wed, 18 Sep 2019 at 09:55, Wood, Tobias 
>>> wrote:
>>>
 *> *This also remind me that we'll have to do something about this
 git-mirror. We can either:

 > (1) - make it empty with a link to the new git repo

 > (2) - keep it as is (i.e., no sync) for a short period and then
 proceed as (1)

 > (3) - delete it and recreate it as a synced mirror of the new repo,
 and then after a short period proceed as (1)



 > If I'm not mistaken option (3) will probably break all users of this
 mirror, so that's probably not the best option!



 I am one of the users of the current github mirror, and yes, as I
 understand it option 3 isn’t really an option because of the re-written
 history. I see no point in it.



 I think option (1) is best. I look forward to swapping over to the
 gitlab mirror.



 Toby

>>>
>>


Re: [eigen] Bitbucket migration

2019-10-02 Thread Rasmus Munk Larsen
It looks like the person's work email might be found here:
https://www.ht.sfc.keio.ac.jp/~eigen/
Gael or Christoph, would you consider contacting them directly?

On Wed, Oct 2, 2019 at 1:56 PM David Tellenbach <
david.tellenb...@tellnotes.org> wrote:

> Hi all,
>
> It also looks like there has been no activity for 10 months on that
> account:
>
> https://gitlab.com/users/eigen/activity
>
>
> This doesn't seem to be enough:
> https://about.gitlab.com/support/#dormant-namespace-requests states that
> two years of inactivity are required. However, it's always possible to ask.
>
> David
>
>
> On 2. Oct 2019, at 22:47, Rasmus Munk Larsen  wrote:
>
> It also looks like there has been no activity for 10 months on that
> account:
>
> https://gitlab.com/users/eigen/activity
>
> On Tue, Oct 1, 2019 at 4:26 PM Patrik Huber  wrote:
>
>> Hi Gael,
>>
>> >> since "eigen" is already taken (and I got no answer from the owner
>> despite one reminder)
>>
>> Have you contacted GitLab support about this? They're usually quite
>> responsive. Eigen is a project with quite some weight behind it, it may not
>> be unlikely that they can do something.
>>
>> -Patrik
>>
>> On Wed, 18 Sep 2019 at 09:55, Wood, Tobias  wrote:
>>
>>> *> *This also remind me that we'll have to do something about this
>>> git-mirror. We can either:
>>>
>>> > (1) - make it empty with a link to the new git repo
>>>
>>> > (2) - keep it as is (i.e., no sync) for a short period and then
>>> proceed as (1)
>>>
>>> > (3) - delete it and recreate it as a synced mirror of the new repo,
>>> and then after a short period proceed as (1)
>>>
>>>
>>>
>>> > If I'm not mistaken option (3) will probably break all users of this
>>> mirror, so that's probably not the best option!
>>>
>>>
>>>
>>> I am one of the users of the current github mirror, and yes, as I
>>> understand it option 3 isn’t really an option because of the re-written
>>> history. I see no point in it.
>>>
>>>
>>>
>>> I think option (1) is best. I look forward to swapping over to the
>>> gitlab mirror.
>>>
>>>
>>>
>>> Toby
>>>
>>
>


Re: [eigen] Bitbucket migration

2019-10-02 Thread David Tellenbach
Hi all,

> It also looks like there has been no activity for 10 months on that account: 
> 
> https://gitlab.com/users/eigen/activity 
> 
This doesn't seem to be enough: 
https://about.gitlab.com/support/#dormant-namespace-requests 
 states that two 
years of inactivity are required. However, it's always possible to ask.

David


> On 2. Oct 2019, at 22:47, Rasmus Munk Larsen  wrote:
> 
> It also looks like there has been no activity for 10 months on that account: 
> 
> https://gitlab.com/users/eigen/activity 
> 
> 
> On Tue, Oct 1, 2019 at 4:26 PM Patrik Huber  > wrote:
> Hi Gael,
> 
> >> since "eigen" is already taken (and I got no answer from the owner despite 
> >> one reminder)  
> 
> Have you contacted GitLab support about this? They're usually quite 
> responsive. Eigen is a project with quite some weight behind it, it may not 
> be unlikely that they can do something.
> 
> -Patrik
> 
> On Wed, 18 Sep 2019 at 09:55, Wood, Tobias  > wrote:
> > This also remind me that we'll have to do something about this git-mirror. 
> > We can either:
> 
> > (1) - make it empty with a link to the new git repo
> 
> > (2) - keep it as is (i.e., no sync) for a short period and then proceed as 
> > (1)
> 
> > (3) - delete it and recreate it as a synced mirror of the new repo, and 
> > then after a short period proceed as (1) 
> 
>  
> 
> > If I'm not mistaken option (3) will probably break all users of this 
> > mirror, so that's probably not the best option!
> 
>  
> 
> I am one of the users of the current github mirror, and yes, as I understand 
> it option 3 isn’t really an option because of the re-written history. I see 
> no point in it.
> 
>  
> 
> I think option (1) is best. I look forward to swapping over to the gitlab 
> mirror.
> 
>  
> 
> Toby
>