自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

RToax

行百里者半九十

  • 博客(23)
  • 资源 (215)
  • 问答 (3)
  • 收藏
  • 关注

原创 OpenMP变量的私有与共享

#include #include #ifdef _OPENMP#include #endifint gval = 8;//gval是共享的void funcb(int *x, int *y, int z)//z是线程私有,z-i{ static int sv;//静态变量,共享的,在内存中只有一份,所以会引起冲突 int u;//自变量,线程私有的 u = (*y)*gv

2017-11-30 22:18:23 4165 4

转载 C语言进程的内存地址空间分配

图为一个执行进程的内存地址空间。代码段就是存储程序文本的,所以有时候也叫做文本段,指令指针中的指令就是从这里取得。数据段是存储数据用的,还可以分成初始化为非零的数据区,BSS,和堆(Heap)三个区域。初始化非零数据区域一般存放静态非零数据和全局的非零数据。BSS是Block Started by Symbol的缩写,原本是汇编语言中的术语。该区域主要存放未初始化的全局数据和静态数据。还有就是

2017-11-30 21:12:04 2731

原创 C语言auto、register、static、extern关键字

1.auto#include#include#includeint a = 0;void show(){ a++; printf("hello: %d\n",a);}void main(int *argv, char *args[]){ show();/**Auto变量:局部变量不作任何说明,都作为自动变量auto,及动态存储的。Auto可省略

2017-11-30 20:23:17 664

原创 C语言二维数组Array[][]

#include#include#include#includeint main(int argc, char*argv[]){ int a[5][3]={ {1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15} }; int b[5][3]={ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};

2017-11-30 20:11:33 565

原创 C语言预处理#line、#error

#line 的作用是改变当前行数和文件名称,它们是在编译程序中预先定义的标识符命令的基本形式如下:#line number["filename"]其中[]内的文件名可以省略。例如:#line 30 a.h //其中,文件名a.h 可以省略不写。这条指令可以改变当前的行号和文件名,例如上面的这条预处理指令就可以改变当前的行号为30,文件名是a.h。初看起来似乎没有什么用,不过,他还是有点用的

2017-11-30 20:06:49 525 1

原创 C语言预处理#pragma

1.#pragma message如果已经宏定义的PI,/**#pragma message(): 在编译信息输出窗口中输出相应的信息 * 这对于源代码信息的控制是非常重要的*/#ifdef PI#pragma message("Already define PI.")#endif编译的时候就会出现:-bash-4.1$ gcc -o

2017-11-30 20:01:21 877 1

原创 Linux查看显示编辑文本文件

1.cat-bash-4.1$ cat --help用法:cat [选项]... [文件]...将[文件]或标准输入组合输出到标准输出。 -A, --show-all 等于-vET -b, --number-nonblank 对非空输出行编号 -e 等于-vE -E, --show-ends

2017-11-29 21:31:28 3131

原创 C语言函数指针&命令行参数

我们可以用函数指针实现多态等高端函数,再加上命令行参数让你的程序提高一个档次。程序如下:#include#include#include#includeint f1(int a){ printf("f1:%d\n",a); return a;}int f2(int a){ printf("f2:%d\n",a); return a*a;

2017-11-29 20:16:06 524

转载 CUDA:对齐内存访问、展开循环提高运算性能

#include "../common/common.h"#include #include /* * This example demonstrates the impact of misaligned reads on performance by * forcing misaligned reads to occur on a float*. Kernels that reduc

2017-11-29 19:46:05 2851

转载 结构体数组(SoA)与数组结构体(AoS)

1.结构体数组(SoA)/* * SoA 结构体数组定义 */struct InnerArray{ float x[LEN]; float y[LEN];};/* * CPU -> SoA 结构体数组的CPU计算形式 */void testInnerArrayHost(InnerArray *A, InnerArray *C, const int n){

2017-11-29 19:32:22 7719 4

原创 CUDA零拷贝内存(zerocopy memory)

为了实现CPU与GPU内存的共享,cuda采用了零拷贝内存,它值固定内存的一种,当然,也就是实际存储空间实在cpu上。零拷贝内存的延迟高,在进行频繁的读写操作时尽量少用,否则会大大降低性能。/* *创建固定内存映射 * * flags: cudaHostAllocDefault: make cudaHostAlloc same as "cudaMallocHost"

2017-11-29 16:07:25 6699

原创 CUDA内存分配、释放、传输,固定内存

源代码来源:点击打开链接cudaMalloc((float **)&d_a, nbytes)

2017-11-29 15:06:13 13155

原创 CUDA全局变量(__device__)的初始化与使用:cudaMemoryToSymbol、cudaMemoryFromSymbol、cudaGetSymbolAddress

在cuda中在设备(device)中声明一个全局变量用__device__关键字修饰:__device__ float devData;初始化为:float value = 3.14f;cudaMemcpyToSymbol(devData, &value, sizeof(float));在使用结束后,将其转回host:cudaMemcpyFromSymbol(&value, de

2017-11-29 14:24:38 13300 1

转载 CUDA:在GPU上实现核函数的嵌套以及编译运行

#include "../common/common.h"#include #include /* * A simple example of nested kernel launches from the GPU. Each thread displays * its information when execution begins, and also diagnostics wh

2017-11-28 21:59:01 3790 6

原创 CUDA:一维、二维的grid、block的核函数线程分配

1.一维grid,一维block int nx = 1 << 14; int ny = 1 << 14; int dimx = 32; dim3 block(dimx, 1); dim3 grid((nx + block.x - 1) / block.x, 1);核函数__global__ void kernel_function(){

2017-11-28 17:00:02 3224

原创 CUDA:使用nvprof工具计时

CUDA在运行程序时加上nvprof会对程序进行性能分析,这种性能分析最重要的就是统计不同函数的运行时间(占比)。-bash-4.1$ nvprof ./a./a Starting...==19114== NVPROF is profiling process 19114, command: ./aVector size 32Execution configure >>Arrays

2017-11-28 16:24:50 5687 2

转载 用CPU计时器统计CUDA核函数的运行时间

该源程序来自《CUDA C语言编程中文译文版》,如有侵权,联系删除。此处只为学习交流。cuda程序如下:#include "../common/common.h"#include #include /* * This example demonstrates a simple vector sum on the GPU and on the host. * sumArraysO

2017-11-28 16:18:18 2806

原创 CUDA线程分配<<<>>>

在cuda中,blockDim表示一个块中线程的维度信息,例如blockDim(2,1,1)代表一个块中有2个thread,gridDim表示一个网格中块的维度。下面给出一个示例程序,这个程序来自CUDA C语言编程中文译本,如有侵权,联系删除。#include "../common/common.h"#include #include /* * Display the dime

2017-11-28 15:30:15 2076 2

转载 MPI_Send和MPI_Recv(初识1)

/** * * * @Copyright Du Zhihui :edited * Li Sanli :review * Chen Yu Liu Peng :proofreading * * Rong

2017-11-24 12:21:49 2636 2

转载 MPI_Get_processor_name,MPI_Get_version

/** * * * @Copyright Du Zhihui :edited * Li Sanli :review * Chen Yu Liu Peng :proofreading * * Rong

2017-11-24 12:05:52 2577 1

转载 OpenMP、MPICH与OpenMPI

原文网址openmp比较简单,修改现有的大段代码也容易。基本上openmp只要在已有程序基础上根据需要加并行语句即可。而mpi有时甚至需要从基本设计思路上重写整个程序,调试也困难得多,涉及到局域网通信这一不确定的因素。不过,openmp虽然简单却只能用于单机多CPU/多核并行,mpi才是用于多主机超级计算机集群的强悍工具,当然复杂。(1)MPI=message passing

2017-11-24 12:01:37 12219

原创 C语言extern用法

1.用extern修饰变量#include#include#includevoid show();void main(int *argv, char *args[]){ show(); printf("num = %d\n",num);}const int num = 3;void show(){ printf("num = %d\n",num)

2017-11-22 15:07:00 4931

原创 C语言局部变量、全局变量、静态局部变量、静态全局变量

建立三个文件,文件名分别为main.c \ head1.c \  head2.cmain.c#include#include#includeint A;void show(){ volatile static int a ;//静态局部变量(static) 静态局部变量定义时前面加static关键字。 a++; f1(a); f2(a);

2017-11-21 22:21:01 490

C语言设计模式 PDF《C Design Pattern》

C语言设计模式 PDF《C Design Pattern》C语言设计模式 PDF《C Design Pattern》C语言设计模式 PDF《C Design Pattern》C语言设计模式 PDF《C Design Pattern》

2024-04-17

C, GNUC GCC 预处理《The C Preprocessor》

C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C, GNUC GCC 预处理《The C Preprocessor》,C

2024-04-16

iperf2 版本,有时候用 iperf3 测试不支持 多 stream

iperf2 版本,有时候用 iperf3 测试不支持 多 stream

2023-12-08

fedora aarch64 39 Docker镜像

fedora aarch64 39 Docker镜像

2023-12-07

ostools操作系统系列工具

ostools操作系统系列工具

2023-12-06

ostools归档压缩文件

ostools归档压缩文件

2023-12-06

unixbench测试程序

unixbench测试程序

2023-12-06

User Guide: Open Build Service

This guide is part of the Open Build Service documentation. These books are considered to contain only reviewed content, establishing the reference documentation of OBS. This guide does not focus on a specic OBS version. It is also not a replacement of the documentation inside of the openSUSE Wiki (https://en.opensuse.org/Portal:Build_Service) . However, content from the wiki may be included in these books in a consolidated form.

2022-05-13

CentOS Stream 9 nasm 安装包

可参考: https://vault.centos.org/8.5.2111/PowerTools/Source/SPackages/nasm-2.15.03-3.el8.src.rpm

2022-05-01

CentOS Stream 9 nasm 源码包

可参考:https://vault.centos.org/8.5.2111/PowerTools/Source/SPackages/nasm-2.15.03-3.el8.src.rpm

2022-05-01

CentOS Stream9 的 terminator 源码 RPM 包。

CentOS Stream9 的 terminator 源码 RPM 包。

2022-04-30

CentOS Stream9 的 terminator RPM包

CentOS Stream9 的 terminator RPM包

2022-04-30

vim配置文件,vim配置文件

vim配置文件,vim配置文件

2022-02-24

Optimizing Linux Kernel with BOLT.pdf

• What is BOLT • How it works • Linux Kernel Challenges

2022-01-21

red_hat_enterprise_linux-8-customizing_anaconda-en-us.pdf

自定义ISO安装过程Anaconda文档,参见 https://gitee.com/rtoax/cclinux-product.img

2022-01-18

多路服务器的价值与实现技术.pdf

多路服务器的价值与实现技术.pdf多路服务器的价值与实现技术.pdf

2021-12-27

vim-config.tar.gz

vim-config.tar.gz

2021-11-11

cclinux-coreos-34.20211111.3.0-live.x86_64.iso

cclinux-coreos-34.20211111.3.0-live.x86_64.iso

2021-11-11

Kernel Probes for ARM-ELC2007.pdf

Kernel Probes for ARM-ELC2007.pdf

2021-10-22

Ftrace Kernel Hooks-More than just tracing.pdf

Ftrace Kernel Hooks-More than just tracing.pdf

2021-10-22

The Amazing World of Kprobes-2016.pdf

The Amazing World of Kprobes-2016.pdf

2021-10-22

binary-protection-schemes.pdf

binary-protection-schemes.pdf

2021-09-10

protecting_binaries.pdf

protecting_binaries.pdf

2021-09-10

DPDK Getting Started Guide for Linux

DPDK Getting Started Guide for Linux

2021-09-10

cpumemory-What Every Programmer Should Know About Memory.pdf

cpumemory-What Every Programmer Should Know About Memory.pdf

2021-09-10

architecture-instruction-set-extensions-programming-reference

architecture-instruction-set-extensions-programming-reference

2021-09-10

history_Intel_CPU.pdf

history_Intel_CPU.pdf

2021-09-10

ia-introduction-basics-paper.pdf

ia-introduction-basics-paper.pdf

2021-09-10

System V Application Binary Interface - AMD64 Architecture

System V Application Binary Interface - AMD64 Architecture Processor Supplement-abi

2021-09-10

The P4 Language Specification.pdf

The P4 Language Specification.pdf

2021-09-10

Hidden Linux Metrics with Prometheus eBPF Exporter.pdf

Hidden Linux Metrics with Prometheus eBPF Exporter

2021-09-03

ASN.1-asn1c图.vsdx

ASN.1-asn1c图.vsdx

2021-09-02

O-RAN.WG3.E2AP-v01.01-看9.3章.docx

O-RAN.WG3.E2AP-v01.01

2021-09-02

E2APDesign 2.0.pptx

E2APDesign 2.0.pptx

2021-09-02

e2ap-v01.01.asn1

e2ap-v01.01.asn1

2021-08-25

e2ap-v01.00.00.asn

前面的文档讲述了如何编译asn1c,如何选取合适的asn1c软件版本,及其简单使用方法。本文将对asn1c的详细使用进行介绍和分析。并结合 O-RAN E2AP (参考**O-RAN.WG3.E2AP-v01.01**)进行编码测试与调试。

2021-08-25

fastq-test-4.select-3.10.0-693.2.2.rt56.623.el7.x86_64.rar

一些火焰图,

2021-08-24

BPF Internals.pdf

BPF Internals.pdf

2021-07-31

intel64 和IA-32 编程手册

intel64 和IA-32 编程手册

2021-07-10

Intel 64 and IA-32 Architectures Software Developer’s Manual Combined

Intel 64 and IA-32 Architectures Software Developer’s Manual Combined Volumes1, 2A, 2B, 2C, 2D, 3A, 3B, 3C, 3D and 4-解密注释.pdf

2021-07-07

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除