Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
完成了hw06的基本要求!
物理核心:4
逻辑核心:4
线程数:4
因为用的是轻薄本的虚拟机,所以性能会比较拉...
结果对比
----------------------------------Old result---------------------
fill: 2.09027s
fill: 2.13145s
saxpy: 0.0397575s
sqrtdot: 0.0888022s
5165.4
minvalue: 0.0843207s
-1.11803
magicfilter: 0.456461s
55924034
scanner: 0.105253s
5.28566e+07
----------------------------------Parallel result---------------------
fill: 0.517877s
fill: 0.520669s
saxpy: 0.0425261s
sqrtdot: 0.0366869s
5792.62
minvalue: 0.0220482s
-1.11803
magicfilter: 0.164679s
55924034
scanner: 0.0727342s
5.28613e+07
看了一会下一节课,saxpy函数应该是因为计算简单,io成为了瓶颈导致并行效果不佳.
嗷还有就是由于用了tbb,原本std::reduce需要修改一下才能通过编译了,也不晓得为啥.....