|Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Subject: Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 28 Jan 2015 09:51:50 -0500
- Cc: eigen <eigen@xxxxxxxxxxxxxxxxxxx>, Benoit Steiner <benoit.steiner.goog@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=df1pbB22CMtYO0Sduj3ZYMQafMXMM0UOmTqEedS28YQ=; b=MsiG4cagEbjMOc/pwfvr4WChL88WF7/AJRM9sM96luu8H5r2R1YKfLB0RFtCHa3+KA wFIA4guEMGFmfQZCQJUKPHvG431wETCOlP6/lmEB0Qe9AaJRrgUEOTV9IMKqNu5YyfQT j1sshNPML6NGrBqunApLsxn4AtF0ngL1gXn35g78dhFBbCxNe0aRBOxHnkO0eDmAftpQ +Fl9tu2Te6+OKMK/498fRIANslOynHwLQ0H9W6T8lLcE6UhKOvVzvrIdHL1wnNDDfygp urMoXB1zYOn5+lHrT0SU7xYa6fuZ7K3C2rbDheJhNLQWEEVobxD1xnsziM+KUpdMkDdi DxwQ==
There may be other compile flags that break the ABI (I don't see any out of hand, which one do you have in mind?), but this (the flags to control SIMD) is a special case because it is very common for people to want to compile the same code with different values for these flags and choose at runtime between these code paths, which becomes very tricky and sub-optimal if the ABI is not the same.
Regardless, to the extent that it's true that *static* 32byte alignment is important for performance, I'm OK to treat this as a documentation issue and default to breaking the ABI, with sufficient warnings/documentation.
I was just wonder to what extent that was the case: static 32byte alignment is irrelevant to 1) dynamic-size matrices, and 2) the most important cases of fixed-size vectorizability (Vector4f, Matrix4f). But, sure, the compromise you're describing sounds fine with enough warnings/documentation, and at least it's more symmetric as we don't hardcode one magic universal alignment (16byte) anymore.