kernel

CUDA ---- 简介

那年仲夏 提交于 2020-03-22 15:12:39
CUDA简介 CUDA是并行计算的平台和类C编程模型,我们能很容易的实现并行算法,就像写C代码一样。只要配备的NVIDIA GPU,就可以在许多设备上运行你的并行程序,无论是台式机、笔记本抑或平板电脑。熟悉C语言可以帮助你尽快掌握CUDA。 CUDA编程 CUDA编程允许你的程序执行在异构系统上,即CUP和GPU,二者有各自的存储空间,并由PCI-Express 总线区分开。因此,我们应该先注意二者术语上的区分: Host:CPU and itsmemory (host memory) Device: GPU and its memory (device memory) 代码中,一般用h_前缀表示host memory,d_表示device memory。 kernel是CUDA编程中的关键,他是跑在GPU的代码,用标示符__global__注明。 host可以独立于host进行大部分操作。当一个kernel启动后,控制权会立刻返还给CPU来执行其他额外的任务。所以,CUDA编程是异步的。一个典型的CUDA程序包含由并行代码补足的串行代码,串行代码由host执行,并行代码在device中执行。host端代码是标准C,device是CUDA C代码。我们可以把所有代码放到一个单独的源文件,也可以使用多个文件或库。NVIDIA C编译器(nvcc

Android 开机动画启动过程详解

断了今生、忘了曾经 提交于 2020-03-22 02:02:24
Android 开机会出现3个画面: 1. Linux 系统启动,出现Linux小企鹅画面(reboot)(Android 1.5及以上版本已经取消加载图片); 2. Android平台启动初始化,出现"A N D R I O D"文字字样画面; 3. Android平台图形系统启动,出现含闪动的ANDROID字样的动画图片(start)。 1、开机图片(Linux小企鹅) (Android 1.5及以上版本已经取消加载图片); Linux Kernel引导启动后,加载该图片。 logo.c中定义nologo,在fb_find_logo(int depth)函数中根据nologo的值判断是否需要加载相应图片。 代码如下: static int nologo; module_param(nologo, bool, 0); MODULE_PARM_DESC(nologo, "Disables startup logo"); /* logo's are marked __initdata. Use __init_refok to tell * modpost that it is intended that this function uses data * marked __initdata. */ const struct linux_logo * __init_refok fb

The mean shift clustering algorithm

最后都变了- 提交于 2020-03-20 03:33:20
The mean shift clustering algorithm MEAN SHIFT CLUSTERING Mean shift clustering is a general non-parametric cluster finding procedure — introduced by Fukunaga and Hostetler [ 1 ], and popular within the computer vision field. Nicely, and in contrast to the more-well-known K-means clustering algorithm, the output of mean shift does not depend on any explicit assumptions on the shape of the point distribution, the number of clusters, or any form of random initialization. We describe the mean shift algorithm in some detail in the technical background section at the end of this post. However, its

Android开机动画过程

半城伤御伤魂 提交于 2020-03-19 04:58:34
Android开机动画过程 2011-03-24 22:05:21 标签: Android 开机动画 移动开发 Android 开机会出现3个画面: 1. Linux 系统启动,出现Linux小企鹅画面(reboot)(Android 1.5及以上版本已经取消加载图片); 2. Android平台启动初始化,出现"A N D R I O D"文字字样画面; 3. Android平台图形系统启动,出现含闪动的ANDROID字样的动画图片(start)。 1、开机图片(Linux小企鹅) (Android 1.5及以上版本已经取消加载图片); Linux Kernel引导启动后,加载该图片。 logo.c中定义nologo,在fb_find_logo(int depth)函数中根据nologo的值判断是否需要加载相应图片。 代码如下: static int nologo; module_param(nologo, bool, 0); MODULE_PARM_DESC(nologo, "Disables startup logo"); /* logo's are marked __initdata. Use __init_refok to tell * modpost that it is intended that this function uses data * marked _

Create language kernels for IPython for a language without ZeroMQ bindings

大城市里の小女人 提交于 2020-03-18 17:15:01
问题 There are some interesting descriptions of writing language kernels to allow a language previously unsupported by IPython to be executed from IPython. In all cases, the kernel creation step involves using the target language's ZeroMQ bindings (since ZeroMQ is a major architectural component of IPython's front-end to kernel communication protocol). In my company, a proprietary language was created a few years ago and is maintained with compilers to bytecode (with a bytecode runner written in C

Create language kernels for IPython for a language without ZeroMQ bindings

蹲街弑〆低调 提交于 2020-03-18 17:13:52
问题 There are some interesting descriptions of writing language kernels to allow a language previously unsupported by IPython to be executed from IPython. In all cases, the kernel creation step involves using the target language's ZeroMQ bindings (since ZeroMQ is a major architectural component of IPython's front-end to kernel communication protocol). In my company, a proprietary language was created a few years ago and is maintained with compilers to bytecode (with a bytecode runner written in C

Create language kernels for IPython for a language without ZeroMQ bindings

岁酱吖の 提交于 2020-03-18 17:12:24
问题 There are some interesting descriptions of writing language kernels to allow a language previously unsupported by IPython to be executed from IPython. In all cases, the kernel creation step involves using the target language's ZeroMQ bindings (since ZeroMQ is a major architectural component of IPython's front-end to kernel communication protocol). In my company, a proprietary language was created a few years ago and is maintained with compilers to bytecode (with a bytecode runner written in C

Linux内核参数修改方法

爱⌒轻易说出口 提交于 2020-03-17 17:01:38
由于Linux的内核参数信息都存在内存中,因此可以通过命令直接修改,并且修改后直接生效。但是,当系统重新启动后,原来设置的参数值就会丢失,而系统每次启动时都会自动去/etc/sysctl.conf文件中读取内核参数,因此将内核的参数配置写入这个文件中,是一个比较好的选择。   首先打开/etc/sysctl.conf文件,查看如下两行的设置值,这里是:   kernel.shmall = 2097152   kernel.shmmax = 4294967295 如果系统默认的配置比这里给出的值大,就不要修改原有配置。同时在/etc/sysctl.conf文件最后,添加以下内容:   fs.file-max = 6553600   kernel.shmmni = 4096   kernel.sem = 250 32000 100 128   net.ipv4.ip_local_port_range = 1024 65000   net.core.rmem_default = 4194304   net.core.rmem_max = 4194304   net.core.wmem_default = 262144   net.core.wmem_max = 262144   这里的“fs.file-max = 6553600”其实是由“fs.file-max = 512 *

(二)linux内核镜像制作

孤街醉人 提交于 2020-03-17 06:35:40
(一)目的 在进行嵌入式开发的时候,我们往往会先在电脑上安装交叉编译器,然后编译目标板上的代码,最后把代码下载到电路板中,嵌入式系统组成包括:BootLoader+kernel+filesystem+application,前面我们已经制作好了BootLoader,这一节我们制作一个kernel镜像 (二)工具 linux-3.5版本内核 Ubuntu 16.04 linux交叉编译环境(我已经安装过,没有安装的可以下载arm-linux-gcc-4.5.1-v6-vfp-20120301.tgz) 这里说明一点我们获取linux内核一般可以从 linux官方 获取,或者从开发板的厂商那获取,我比较推荐第二种,因为第一种还需要我们进行有关硬件的配置 (三)操作流程 1、将linux-3.5-20141114.tar拷贝到Linux系统中 2、解压linux-3.5-20141114.tar tar -xvf linux-3.5-20141114.tar 3、进入解压后的目录 make menuconfig:打开配置界面,若无法打开需要安装库 apt install ncurses-dev 运行make menuconfig打开上面的窗口可以进行内核功能的删减 按下面的步骤修改一个地方: System Type ---> [ ] Support TrustZone-enabled

OS Review Chapter 3: Operating-System Structures

北战南征 提交于 2020-03-17 03:19:32
Chapter 3: Operating-System Structures Common System Components Process Management : A process is a program in execution Process creation and deletion. process suspension and resumption. Provision of mechanisms for: (1)process synchronization (2)process communication (3)deadlock handling Main Memory Management Keep track of which parts of memory are currently being used and by whom. Decide which processes to load when memory space becomes available. Allocate and deallocate memory space as needed. File Management I/O System Management : A buffer-caching system A general device-driver interface