Archived issue #0024405
TKernel - add aligned allocator class NCollection_AlignedAllocator
Description
The SSE optimizations require pointer aligned at 16 bytes boundary.
However at this moment TKernel doesn't ship any allocator with guarantied alignment which complicates usage of such optimizations.
It is suggested to implement new class Standard_MMgrAligned which implements aligned allocator using platform-specific APIs.
New API should be used instead of MemAllocAligned/MemFreeAligned functions declared within Image_PixMap.cxx.
In addition, DEFINE_STANDARD_ALIGNED_ALLOC macro, NCollection_AlignedAllocator might be considered as well.
However at this moment TKernel doesn't ship any allocator with guarantied alignment which complicates usage of such optimizations.
It is suggested to implement new class Standard_MMgrAligned which implements aligned allocator using platform-specific APIs.
New API should be used instead of MemAllocAligned/MemFreeAligned functions declared within Image_PixMap.cxx.
In addition, DEFINE_STANDARD_ALIGNED_ALLOC macro, NCollection_AlignedAllocator might be considered as well.
Public activity
4 archived notes
Participants are labeled by their role within this record.
Some implementation should be provided in CR24238, please have a look
Patch is ready for review in branch CR24405.
No remarks, please test
Dear BugMaster,
Branch CR24405 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 27 (27 on master)
Windows: 0 (0 on master)
products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 394510388 / 393242136
Total CPU difference: 53564.59999999996 / 57189.309999999896
Testing on Windows:
Total MEMORY difference: 422643012 / 414274688
Total CPU difference: 39391.015625 / 42798.984375
There are no differences in images found by testdiff.
Branch CR24405 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 27 (27 on master)
Windows: 0 (0 on master)
products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 394510388 / 393242136
Total CPU difference: 53564.59999999996 / 57189.309999999896
Testing on Windows:
Total MEMORY difference: 422643012 / 414274688
Total CPU difference: 39391.015625 / 42798.984375
There are no differences in images found by testdiff.
Related records