Andes Workshop

It is currently Wed Jun 28, 2017 2:28 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: About Single Precision Constant in AndeSight Build Settings
PostPosted: Tue May 16, 2017 1:32 pm 
Offline

Joined: Fri Dec 02, 2016 11:06 am
Posts: 5
1.When evaluating the performance for CPU's computing the float point data,the algorithm programme usually includes many float point variable or constant definition of Single Precision or Double Precision.For 32 bit processor,Single Precision float point takes 32 bit to storage,while Double Precision takes 64 bit to storage.GCC uses 64 bit memory space to storage decimals by default when not declaring the specific type,for example,constant 1.3f taking 32 bit memory as well as constant 1.3 taking 64 bit memory according to the mechanism of GCC compliler.
2.There are 3 tips for using "Single Precision Constant" option in AndeSight which is compatible.
(1).并非使用SPU就一定勾选“Single Precision Constant”option,而是要根据算法程序需要。如果单精度就可以满足需要,同时程序代码对比如语句“float a = 1.3;”中1.3 这样的constant 也没有加f做具体声明,那么勾选此option就能让性能提升而且没有坏处(如代码中都加了1.3f这种严谨写法,加了option不会有错,但不加也一样)。
(2).不论是否选择使用SPU,只要算法程序依然有双精度的要求,那么最好不要勾选这个option(除非代码中,双精度的constant 用了d来声明,而单精度的未声明)。
(3).“Single Precision Constant”这个option只有在AndeSight 212 用v3s or v3f时才可以加,以前的AndeSight版本以及212 版本内其它toolchain是没有这个option的。
3.Therefore,if "Single Precision Constant"option needed when measuring the performance of Single Precision for FPU, just select Single Precision Constant option in AndeSight Build settings-Miscellaneous options(Figure as follows) to tell GCC compliler to treat floating point constant as single precision constant instead of converting it to double precision constant.


Attachments:
1494908577(1).png
1494908577(1).png [ 27.76 KiB | Viewed 96 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group