[{"data":1,"prerenderedAt":86},["ShallowReactive",2],{"category-data-并行计算":3},[4],{"id":5,"title":6,"body":7,"description":72,"extension":73,"meta":74,"navigation":81,"ogImage":76,"path":82,"seo":83,"stem":84,"__hash__":85},"content/blogs/5. OpenMP 学习笔记.md","OpenMP 学习笔记",{"type":8,"value":9,"toc":65},"minimark",[10,14,18,22,28,39,42],[11,12,13],"h2",{"id":13},"背景",[15,16,17],"p",{},"这学期选修了并行计算这门课程，但学期过半一点还没开始学（），之前的实验啥的全仰仗 GPT 大人，最近开始打算好好学一学，先从课程的第一部分：CPU 并行学习。",[11,19,21],{"id":20},"openmp","OpenMP",[23,24,25],"blockquote",{},[15,26,27],{},"OpenMP（Open Multi-Processing）是一套支持跨平台共享内存方式的多线程并发的编程API，使用C,C++和Fortran语言，可以在大多数的处理器体系和操作系统中运行，包括Solaris, AIX, HP-UX, GNU/Linux, Mac OS X, 和Microsoft Windows。包括一套编译器指令、库和一些能够影响运行行为的环境变量。",[15,29,30,31,38],{},"这个介绍摘自 ",[32,33,37],"a",{"href":34,"rel":35},"https://zh.wikipedia.org/wiki/OpenMP",[36],"nofollow","维基百科 OpenMP","，在目前的并行计算框架中，OpenMP 是最容易上手的一个框架，通过许多高层抽象隐藏了实现的具体细节，只需要串行程序中加入OpenMP预处理指令, 就可以实现串行程序的并行化。",[11,40,41],{"id":41},"参考资料",[43,44,45,52,58],"ul",{},[46,47,48],"li",{},[32,49,6],{"href":50,"rel":51},"https://parallel.zhangjikai.com/openmp.html",[36],[46,53,54],{},[32,55,57],{"href":34,"rel":56},[36],"维基百科",[46,59,60],{},[32,61,64],{"href":62,"rel":63},"https://www.bilibili.com/video/BV1SW411s7ST",[36],"Introduction to OpenMP - Tim Mattson (Intel)",{"title":66,"searchDepth":67,"depth":67,"links":68},"",2,[69,70,71],{"id":13,"depth":67,"text":13},{"id":20,"depth":67,"text":21},{"id":41,"depth":67,"text":41},"2026年春季学期并行计算课程的OpenMP学习笔记。","md",{"date":75,"image":76,"alt":77,"tags":78,"published":81},"1 May 2026","/blogs-img/blog4.jpg","并行计算学习笔记",[79,80],"Linux","并行计算",true,"/blogs/openmp",{"title":6,"description":72},"blogs/5. OpenMP 学习笔记","3cqC4qDQLnD-zXRvzydKPsXhvOzyB39QnVWQ326QAKQ",1777735912421]