首页 开发技术 其它     /    FXdiv:C99C++仅用于标头的库,用于通过定点乘除除-源码

FXdiv:C99C++仅用于标头的库,用于通过定点乘除除-源码

上传者: weixin_42131443 | 上传时间:2025/9/18 0:17:03 | 文件大小:14KB | 文件类型:ZIP
FXdiv:C99C++仅用于标头的库,用于通过定点乘除除-源码
FXdiv仅标头库,用于通过定点乘以逆除法在现代CPU和GPU上,整数除法比乘法要慢几倍。
FXdiv实现了一种算法,用乘法和两次移位替换整数除法。
当应用程序执行相同除数的重复除法时,此算法可提高性能。
产品特点uint32_t,uint64_t和size_t整数除法仅标头的库,无需安装或构建与C99,C++,OpenCL和CUDA兼容使用特定于平台的编译器内部函数以获得最佳性能包含单元测试和微基准测试例#include/*Divisionofarraybyaconstant:referenceimplementation*/voiddivide_array_c(size_tlength,uint32_tarray[],uint32_tdivisor){for(size_ti=0;i<length;i++){array[i]/=divisor;}}/*Divisionofarraybyaconstant:implementati 本软件ID:14988578

文件下载

资源详情

[{"title":"(21个子文件14KB)FXdiv:C99C++仅用于标头的库,用于通过定点乘除除-源码","children":[{"title":"FXdiv-master","children":[{"title":"configure.py <span style='color:#111;'>968B</span>","children":null,"spread":false},{"title":"confu.yaml <span style='color:#111;'>136B</span>","children":null,"spread":false},{"title":"bench","children":[{"title":"divide.cc <span style='color:#111;'>1.50KB</span>","children":null,"spread":false},{"title":"multiply.cc <span style='color:#111;'>1.24KB</span>","children":null,"spread":false},{"title":"round-down.cc <span style='color:#111;'>1.40KB</span>","children":null,"spread":false},{"title":"init.cc <span style='color:#111;'>592B</span>","children":null,"spread":false},{"title":"quotient.cc <span style='color:#111;'>1.34KB</span>","children":null,"spread":false}],"spread":true},{"title":"CMakeLists.txt <span style='color:#111;'>4.32KB</span>","children":null,"spread":false},{"title":".travis.yml <span style='color:#111;'>182B</span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'>1.09KB</span>","children":null,"spread":false},{"title":"test","children":[{"title":"multiply-high.cc <span style='color:#111;'>2.01KB</span>","children":null,"spread":false},{"title":"quotient.cc <span style='color:#111;'>7.22KB</span>","children":null,"spread":false}],"spread":true},{"title":"cmake","children":[{"title":"DownloadGoogleBenchmark.cmake <span style='color:#111;'>478B</span>","children":null,"spread":false},{"title":"DownloadGoogleTest.cmake <span style='color:#111;'>467B</span>","children":null,"spread":false}],"spread":true},{"title":"WORKSPACE <span style='color:#111;'>978B</span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'>2.93KB</span>","children":null,"spread":false},{"title":"jni","children":[{"title":"Application.mk <span style='color:#111;'>80B</span>","children":null,"spread":false},{"title":"Android.mk <span style='color:#111;'>158B</span>","children":null,"spread":false}],"spread":true},{"title":"BUILD.bazel <span style='color:#111;'>1.66KB</span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'>257B</span>","children":null,"spread":false},{"title":"include","children":[{"title":"fxdiv.h <span style='color:#111;'>12.84KB</span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明