Skip to content

Commit 8843408

Browse files
committed
Initial commit
0 parents  commit 8843408

File tree

5 files changed

+64
-0
lines changed

5 files changed

+64
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build
2+
GNUmakefile

CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cmake_minimum_required(VERSION 3.12)
2+
project(hellocmake LANGUAGES CXX)
3+
4+
set(CMAKE_CXX_STANDARD 17)
5+
if (NOT CMAKE_BUILD_TYPE)
6+
set(CMAKE_BUILD_TYPE Release)
7+
endif()
8+
9+
add_executable(main main.cpp)

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# 高性能并行编程与优化 - 第0x讲的回家作业
2+
3+
通过 pull request 提交作业。会批分数,但是:
4+
5+
没有结业证书,回家作业仅仅作为评估学习效果和巩固知识的手段,不必为分数感到紧张 :)
6+
量力而行,只要能在本课中,学到昨天的自己不懂的知识,就是胜利,没必要和别人攀比。
7+
注意不要偷看别人的作业哦!
8+
9+
- 课件:https://github.com/parallel101/course
10+
- 录播:https://space.bilibili.com/263032155
11+
12+
作业提交时间不限 :) 即使完结了还想交的话我也会看的~ 不过最好在下一讲开播前完成。
13+
14+
- 如何开 pull request:https://zhuanlan.zhihu.com/p/51199833
15+
- 如何设置 https 代理:https://www.jianshu.com/p/b481d2a42274
16+
17+
## 评分规则
18+
19+
- 完成作业基本要求 50 分(详见下方"作业要求")
20+
- 能够在 PR 描述中用自己的话解释 25 分
21+
- 代码格式规范、能够跨平台 5 分
22+
- 有自己独特的创新点 20 分
23+
- 明显抄袭现象 -100 分
24+
25+
## 作业要求
26+
27+
修改 main.cpp,改良其中的双链表类 `List`
28+
29+
- 避免函数参数不必要的拷贝 5 分
30+
- 修复智能指针造成的问题 10 分
31+
- 改用 `unique_ptr<Node>` 10 分
32+
- 实现拷贝构造函数为深拷贝 15 分
33+
- 说明为什么可以删除拷贝赋值函数 5 分
34+
- 改进 `Node` 的构造函数 5 分
35+
36+
并通过 `main()` 函数中的基本测试。
37+
38+
## 关于内卷
39+
40+
如果你把 List 改成了基于迭代器的,或是作为模板 `List<int>`
41+
只要是在 **满足作业要求的基础** 上,这是件好事!
42+
老师会酌情加分,视为“独特的创新点”,但最多不超过 20 分。

main.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <cstdio>
2+
3+
int main() {
4+
printf("Hello, world!\n");
5+
return 0;
6+
}

run.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
set -e
3+
cmake -B build
4+
cmake --build build
5+
build/main

0 commit comments

Comments
 (0)