clang

SpaceVim插件

删除回忆录丶 提交于 2020-08-05 18:15:59
# All SpaceVim option below [option] section [options] # set spacevim theme. by default colorscheme layer is not loaded, # if you want to use more colorscheme, please load the colorscheme # layer colorscheme = "gruvbox" colorscheme_bg = "dark" # Disable guicolors in basic mode, many terminal do not support 24bit # true colors enable_guicolors = true # Disable statusline separator, if you want to use other value, please # install nerd fonts statusline_separator = "arrow" statusline_inactive_separator = "arrow" buffer_index_type = 4 enable_tabline_filetype_icon = true enable_statusline_mode =

Why does adding an xorps instruction make this function using cvtsi2ss and addss ~5x faster?

99封情书 提交于 2020-08-05 04:47:31
问题 I was messing around with optimizing a function using Google Benchmark, and ran into a situation where my code was unexpectedly slowing down in certain situations. I started experimenting with it, looking at the compiled assembly, and eventually came up with a minimal test case that exhibits the issue. Here's the assembly I came up with that exhibits this slowdown: .text test: #xorps %xmm0, %xmm0 cvtsi2ss %edi, %xmm0 addss %xmm0, %xmm0 addss %xmm0, %xmm0 addss %xmm0, %xmm0 addss %xmm0, %xmm0

Why does adding an xorps instruction make this function using cvtsi2ss and addss ~5x faster?

若如初见. 提交于 2020-08-05 04:47:11
问题 I was messing around with optimizing a function using Google Benchmark, and ran into a situation where my code was unexpectedly slowing down in certain situations. I started experimenting with it, looking at the compiled assembly, and eventually came up with a minimal test case that exhibits the issue. Here's the assembly I came up with that exhibits this slowdown: .text test: #xorps %xmm0, %xmm0 cvtsi2ss %edi, %xmm0 addss %xmm0, %xmm0 addss %xmm0, %xmm0 addss %xmm0, %xmm0 addss %xmm0, %xmm0

Why does adding an xorps instruction make this function using cvtsi2ss and addss ~5x faster?

爱⌒轻易说出口 提交于 2020-08-05 04:47:09
问题 I was messing around with optimizing a function using Google Benchmark, and ran into a situation where my code was unexpectedly slowing down in certain situations. I started experimenting with it, looking at the compiled assembly, and eventually came up with a minimal test case that exhibits the issue. Here's the assembly I came up with that exhibits this slowdown: .text test: #xorps %xmm0, %xmm0 cvtsi2ss %edi, %xmm0 addss %xmm0, %xmm0 addss %xmm0, %xmm0 addss %xmm0, %xmm0 addss %xmm0, %xmm0

CentOS 7.8下安装完美安装配置Rosetta

陌路散爱 提交于 2020-07-29 06:29:16
注意编译过程中需要海量的内存(>=64GB for -j 24)。 硬件环境 CPU: 50 cores 内存: 80GB 1. 安装依赖 yum install boost-devel libstdc++ zlib zlib-devel bzip2 2. 编译器的选择 使用GCC编译器 最新的Rosetta代码编译依赖完整的C++11特性,因此我们需要更新系统自带的gcc编译器。如果使用gcc-8.21, 完全可以编译通过Rosetta. CentOS 7.8升级gcc-8.2 使用Clang编译器 版本Clang 3.4.2, 此外你需要额外编译clang版本的openmpi。clang3.4完全兼容C++11 regex。推荐使用!并且更加灵活和快速。 yum install epel-release yum install clang clang-devel clang-analyzer 3.OpenMPI的编译与安装 GCC编译环境: CentOS 7.8安装OpenMPI3.1.0 环境变量配置: vim ~/.bash_profile #OpenMPI export PATH=$PATH:/usr/local/openmpi/bin export LD_LIBRARY_PATH=/usr/local/openmpi/lib source ~/.bash_profile

#新闻拍一拍# 苹果强势逼迫整个 CA 行业进入一年的证书寿命期

China☆狼群 提交于 2020-07-28 10:39:43
苹果强势逼迫整个 CA 行业进入一年的证书寿命期 苹果公司在 2020 年 2 月单方面做出的一项决定,并有效地强势逼迫证书颁发机构行业接受 TLS 证书 398 天的新默认寿命。苹果打破了 CA/B 论坛的标准操作程序,没有要求投票,而是简单地宣布决定在其设备上实施 398 天的寿命。继苹果最初宣布之后,Mozilla 和谷歌也表示了类似的意向,将在其浏览器中实施同样的规则。从 2020 年 9 月 1 日开始,苹果、谷歌和 Mozilla 的浏览器和设备将对有效期超过 398 天的新 TLS 证书显示错误。TLS 证书的寿命从 8 年开始,经过多年的发展,浏览器厂商对其进行了削足适履,将其降低到 5 年,然后是 3 年,再到2年。上一次变化发生在 2018 年 3 月,当时浏览器制造商试图将 SSL 证书寿命从三年减少到一年,但在 CA 的积极反击下妥协了两年。简单点说,就是表明浏览器厂商控制了 CA/B 论坛,他们完全控制了 HTTPS 生态系统,而 CA 只是参与者,没有实际权力。 来源: cnBeta.COM 拍一拍:这个世界果然是谁的拳头大谁说了算。 部分开源项目着手支持 macOS ARM64 虽然首批搭载苹果 64 位 ARM 芯片的 MacBook/Mac 最快也要到年底才会面向消费者提供,并且在这之前苹果只向开发者提供数量有限的开发机,但部分开源项目已经在为

clickhouse交叉编译(编译机器x86,目标平台ARM64),clang: error: invalid linker name in argument '-fuse-ld=lld'

大城市里の小女人 提交于 2020-07-26 15:26:47
-- The C compiler identification is Clang 8.0.1 -- The CXX compiler identification is Clang 8.0.1 -- Check for working C compiler: /usr/bin/clang-8 -- Check for working C compiler: /usr/bin/clang-8 -- broken CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler "/usr/bin/clang-8" is not able to compile a simple test program. It fails with the following output: Change Dir: /root/ClickHouse/build-arm64/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/ninja" "cmTC_3f054" [1/2] Building C object CMakeFiles/cmTC_3f054.dir/testCCompiler.c.o [2/2] Linking C

mac安装go环境

本小妞迷上赌 提交于 2020-07-25 06:09:32
下载pkg文件 https://golang.google.cn/dl/ sudo vim /etc/profile 11 export GOROOT=/usr/local/go 12 export GOPATH=${GOROOT}/gopath 13 export PATH=$PATH:${GOROOT}/bin 14 export GO111MODULE=on 15 export GOPROXY=https://goproxy.cn source /etc/profile 说明: 1. GOROOT 为go安装目录, 在mac下使用pkg包安装的, 目录为 /usr/loca/go 如果用go mod gopath 设置为/usr/local/go/gopath 查看环境 go env macdeMacBook-Pro:www mac$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/mac/Library/Caches/go-build" GOENV="/Users/mac/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE=""

How do you use clang's new custom size int feature?

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-22 14:12:43
问题 Recently, I heard that clang got a new feature, _ExtInt . I know that it lets you specify the size of an integer (odd or even like 13-bit int), but how do you use it? 回答1: _ExtInt is to be used as a normal specifier. For example: _ExtInt(13) foo; Here you declared foo to be of 13 bits. Remember to not put short or long type of keywords before it (cause it wouldn't really make sense), though you can put signed or unsigned ( signed is default). Note that you aren't allowed to do things like;

How do you use clang's new custom size int feature?

喜夏-厌秋 提交于 2020-07-22 14:12:09
问题 Recently, I heard that clang got a new feature, _ExtInt . I know that it lets you specify the size of an integer (odd or even like 13-bit int), but how do you use it? 回答1: _ExtInt is to be used as a normal specifier. For example: _ExtInt(13) foo; Here you declared foo to be of 13 bits. Remember to not put short or long type of keywords before it (cause it wouldn't really make sense), though you can put signed or unsigned ( signed is default). Note that you aren't allowed to do things like;