Re: [eigen] array functionality... |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] array functionality...
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Wed, 10 Mar 2010 20:06:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=gNnDLuIwzUH3rVlm9KT1f4POV14q2moJ2ULZg8fv8hU=; b=KSEAowzgXXSLkicguC4BFjoPGnVrtbb139Uvc5WlSqcp2hIr97Q5x0Xc2c9V/511q3 uexNtjeZ3M6elG6Qok7R0JycKDCPORPpWq/WFkmf3h8vUBilniRgwtb7z3BshyTIig/S 8WJ/4eN1xBn2IU41sxox+nBw8CN6qebeXdeEo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Hnh0LHrCcYHZgX7+avHtf9x7I7+LOd9qZ/XlSyglDcfppD51NcZ7zLGnVPz0Q7CzFE cRa3wqFojmi74DTXPyMUYFW1vdHneGZscoa69KWy+mrBOp4Y4sS5k6e1IqfLoqsV+mUi 1/o0m9xYTwOSf1bE6WjyqvcQwmregXdooGSek=
I started looking into the performance differences between MSVC and GCC.
First thing I stumbled upon is the alignment handling in
struct ei_redux_impl<Func, Derived, LinearVectorizedTraversal,
NoUnrolling>::run(...)
In the already aligned path, the alignment is double checked via the
alignment enum. In the example I previously attached, this is always
false for method_a, no matter whether the small Array dimension is
fixed, e.g. to 44 or whether it is dynamic. I have to say that I
changed the size on purpose such that each column is aligned.
But even when the alignment enum were true, why do we at all need to
check in the aligned path for aligned addresses? Why not use
PacketScalar packet_res = mat.template packet<Aligned>(alignedStart);
for(int index = alignedStart + packetSize; index < alignedEnd; index
+= packetSize)
packet_res = func.packetOp(packet_res, mat.template packet<Aligned>(index));
Regards,
Hauke