Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

oneAPI tbb compiler warning C4324

dr_m7
Beginner
1,579 Views

When using oneAPI tbb, Visual Studio 2019 throws a handful of warnings in _task.h, as shown below:


Warning C4324 'tbb::detail::d1::task': structure was padded due to alignment specifier DeepC C:\Program Files (x86)\Intel\oneAPI\tbb\2021.1.1\include\oneapi\tbb\detail\_task.h 233

 

Is this actually a problem? If so is there a resolution?

0 Kudos
1 Solution
James_T_Intel
Moderator
1,424 Views

This warning is not likely an actual problem. This warning indicates that memory alignment was requested, and a datatype was padded out to meet that request.


For example, if you request aligning on a 64 byte boundary, a 72 byte object will need to be padded out to 128 bytes in order to maintain alignment.


The warning is emitted because you might not have intended this. Alignment helps with data movement, especially in relation to SIMD code. But it does increase the memory footprint.


View solution in original post

0 Kudos
1 Reply
James_T_Intel
Moderator
1,425 Views

This warning is not likely an actual problem. This warning indicates that memory alignment was requested, and a datatype was padded out to meet that request.


For example, if you request aligning on a 64 byte boundary, a 72 byte object will need to be padded out to 128 bytes in order to maintain alignment.


The warning is emitted because you might not have intended this. Alignment helps with data movement, especially in relation to SIMD code. But it does increase the memory footprint.


0 Kudos
Reply