http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55457



             Bug #: 55457

           Summary: Having some predefined macros to get more information

                    about gcc vector extensions capabilities would be nice

    Classification: Unclassified

           Product: gcc

           Version: 4.7.2

            Status: UNCONFIRMED

          Severity: enhancement

          Priority: P3

         Component: c

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: siarhei.siamas...@gmail.com





One practical problem is how to identify whether vector extensions are

beneficial or a fallback to the standard C code is better to be taken. In the

case of OpenCL, there are param values such as

CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT,

etc.



   

http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html



If gcc could have some sort of predefined macro telling that "preferred vector

width is 1", it could be used in the code to avoid getting performance penalty

by just using normal C code when compiling for non-SIMD capable platforms.

Reply via email to