[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to build compatible packages that use Eigen?



Hi, Dima,

Looking at your patch, why do you delete all the #ifndef block in the
first place?
Adding just "#define EIGEN_MALLOC_ALREADY_ALIGNED 0" line on top of
the #ifndef block
should do the job.

2024年2月7日(水) 16:56 Dima Kogan <dkogan@debian.org>:
>
> I hit this problem again at work yesterday, so let's fix it.
>
> I'm attaching a patch that can be added to the quilt patch stack in our
> libeigen3-dev package. This disables the conditional preprocessor logic
> that selects the allocator/deallocator behavior. With this patch we
> always make no assumptions about the alignment of malloc(), and we
> ALWAYS use eigen's manual allocator to force alignment. This is maybe a
> bit less efficient than the other path, but dynamic allocation shouldn't
> be in any hot code path anyway.
>
> We could also use aligned_alloc() or memalign() instead here, also
> unconditionally. The "unconditional" is the important part: it must be
> consistent with any build flags, otherwise stuff can crash.
>
> Is this reasonable?
>
> Thanks.
>

Best regards,
-- 
Ryo IGARASHI, Ph.D.
rigarash@gmail.com


Reply to: