Neon Instruction C支持的向量运算

2023-11-13

转载请标明出处:https://blog.csdn.net/u013752202/article/details/92008843

文章目的:

快速索引到需要的向量运算

vadd -> ri = ai + bi;    //--1、Vector add(正常指令):  r, a, b have equal lane sizes

vaddl -> ri = ai + bi;    //--2、Vector long add(长指令):  a, b have equal lane sizes,

vhadd -> ri = (ai + bi) >> 1;    //--4、Vector halving add:

vrhadd -> ri = (ai + bi + 1) >> 1;    //--5、Vector rounding halving add:

vqadd -> ri = sat(ai + bi);    //--6、Vector saturating add(饱和指令):

vaddhn -> ri = sat(ai + bi);    //--7、Vector add high half(窄指令):

vraddhn -> ri = ai + bi;    //--8、Vector rounding add high half(窄指令):

vmul -> ri = ai * bi;    //--1、Vector multiply(正常指令):

vmla -> ri = ai + bi * ci;    //--2、Vector multiply accumulate:

vqdmulh -> ri = sat(ai * bi);    //--6、Vector saturating doubling multiply high:

vqdmlal -> ri = ai + bi * ci;    //--8、Vector saturating doubling multiply accumulate long:

vqdmlsl -> ri = ai - bi * ci;    //--9、Vector saturating doubling multiply subtract long:

vmull -> ri = ai * bi;    //--10、Vector long multiply(长指令):

vqdmull -> ri = ai * bi;    //--11、Vector saturating doubling long multiply:

vfma -> ri = ai + bi * ci;    //--12、Fused multiply accumulate:

vfms -> ri = ai - bi * ci;    //--13、Fused multiply subtract:

vsub -> ri = ai - bi;    //--1、Vector subtract(正常指令):

vsubl -> ri = ai - bi;    //--2、Vector long subtract(长指令):

vsubw -> ri = ai - bi;    //--3、Vector wide subtract(宽指令):

vqsub -> ri = sat(ai - bi);    //--4、Vector saturating subtract(饱和指令):

vhsub -> ri = (ai - bi) >> 1;    //--5、Vector halving subtract:

vsubhn -> ri = ai - bi;    //--6、Vector subtract high half(窄指令):

vrsubhn -> ai - bi;    //--7、Vector rounding subtract high half(窄指令):

vceq -> ri = ai == bi ? 1...1 : 0...0;    //--1、Vector compare equal(正常指令):

vcge-> ri = ai >= bi ? 1...1:0...0;    //--2、Vector compare greater-than or equal(正常指令):

vcle -> ri = ai <= bi ? 1...1:0...0;    //--3、Vector compare less-than or equal(正常指令):

vcgt -> ri = ai > bi ? 1...1:0...0;    //--4、Vector compare greater-than(正常指令):

vclt -> ri = ai < bi ? 1...1:0...0;    //--5、Vector compare less-than(正常指令):

vtst -> ri = (ai & bi != 0) ? 1...1:0...0;    //--正常指令,

vabd -> ri = |ai - bi|;    //--1、Absolute difference between the arguments(正常指令):

vabdl -> ri = |ai - bi|;    //--2、Absolute difference - long(长指令):

vaba -> ri = ai + |bi - ci|;    //--3、Absolute difference and accumulate:

vabal -> ri = ai + |bi - ci|;    //--4、Absolute difference and accumulate - long:

vmax -> ri = ai >= bi ? ai : bi;    //--正常指令,  returns the larger of each pair

vmin -> ri = ai >= bi ? bi : ai;    //--正常指令,  returns the smaller of each pair

vshl -> ri = ai << bi;    //--1、Vector shift left(饱和指令):  (negative values shift right)

vshr -> ri = ai >> b;    //--1、Vector shift right by constant: The results are truncated.

vshl -> ri = ai << b;    //--2、Vector shift left by constant:

vrshr -> ri = ai >> b;    //--3、Vector rounding shift right by constant:

vsra -> ri = (ai >> c) + (bi >> c);    //--4、Vector shift right by constant and accumulate:

vqshl -> ri = sat(ai << b);    //--6、Vector saturating shift left by constant:

vqshlu -> ri = ai << b;    //--7、Vector signed->unsigned saturating shift left by constant:

vshrn -> ri = ai >> b;    //--8、Vector narrowing shift right by constant:

vqshrn -> ri = ai >> b;    //--11、Vector narrowing saturating shift right by constant:

vrshrn -> ri = ai >> b;    //--12、Vector rounding narrowing shift right by constant:

vshll -> ri = ai << b;    //--14、Vector widening shift left by constant:

vabs -> ri = |ai|;    //--1、Absolute(正常指令):

vqabs -> ri = sat(|ai|);    //--2、Saturating absolute(饱和指令):

vneg -> ri = -ai;    //--1、Negate(正常指令):  negates each element in a vector.

vqneg -> ri = sat(-ai);    //--2、Saturating Negate:

vn -> ri = ~ai;    //--1、Bitwise not(正常指令): vm

vand -> ri = ai & bi;    //--2、Bitwise and(正常指令):  performs a bitwise AND between

vorr -> ri = ai | bi;    //--3、Bitwise or(正常指令):  performs a bitwise OR between

veor -> ri = ai ^ bi;    //--4、Bitwise exclusive or (EOR or XOR)(正常指令):

vbic -> ri = ~ai & bi;    //--5、Bit Clear(正常指令):

vorn -> ri = ai | (~bi);    //--6、Bitwise OR complement(正常指令):

vn -> ri = ai[0...8];    //--1、Vector narrow integer(窄指令): vmo copies the least

vmul -> ri = ai * b;    //--1、Vector multiply by scalar:

vmull ->  ri = ai * b;    //--3、Vector long multiply with scalar:

vmull -> ri = ai * b[c];    //--4、Vector long multiply by scalar:

vqdmull -> ri = sat(ai * b);    //--5、Vector saturating doubling long multiply with scalar:

vqdmull -> ri = sat(ai * b[c]);    //--6、Vector saturating doubling long multiply by scalar:

vmla -> ri = ai + bi * c;    //--11、Vector multiply accumulate with scalar:

vmla -> ri = ai + bi * c[d];    //--12、Vector multiply accumulate by scalar:

vmlal -> ri = ai + bi * c;    //--13、Vector widening multiply accumulate with scalar:

vmlal -> ri = ai + bi * c[d];    //--14、Vector widening multiply accumulate by scalar:

vmls -> ri = ai - bi * c;    //--17、Vector multiply subtract with scalar:

vmls -> ri = ai - bi * c[d];    //--18、Vector multiply subtract by scalar:

vmlsl -> ri = ai - bi * c;    //--19、Vector widening multiply subtract with scalar:

vmlsl -> ri = ai - bi * c[d];    //--20、Vector widening multiply subtract by scalar:

函数说明详见《Neon Intrinsics各函数介绍》

转载请标明出处:https://blog.csdn.net/u013752202/article/details/92008843

 

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Neon Instruction C支持的向量运算 的相关文章

随机推荐

  • 一个经过改良的XMLHelper(包含了序列化,反序列化,创建xml文件,读取节点

    转自 http www 360doc com content 13 0905 20 1944636 312482651 shtml public class XmlHelper public XmlHelper public enum Xm
  • 如何在 VS Code 中安装和使用 Amazon CodeWhisperer

    大家好 今天我将向大家介绍如何在 Visual Studio Code 简称 VS Code 中安装和使用 Amazon CodeWhisperer 这是一个强大的 AI 辅助代码生成工具 CodeWhisperer 可以帮助你自动生成你需
  • 114DNS Public DNS+ 阿里DNS 百度DNS 360 DNS派 Google DNS

    为什么80 的码农都做不了架构师 gt gt gt 114DNS 腾讯dnspod DNS 阿里DNS 百度DNS 360DNS Google DNS公 共DNS评测体验报告从ping及dig返回时间对比测试 国内DNS普遍很快 而阿里DN
  • 在react中使用redux并实现计数器案例

    React Redux 在recat中不使用redux 时遇到的问题 在react中组件通信的数据是单向的 顶层组件可以通过props属性向下层组件传递数据 而下层组件不能向上层组件传递数据 要实现下层组件修改数据 需要上层组传递修改数据的
  • Matplotlib 散点图 绘制详解

    目录 基础 点的大小 点的颜色 透明度 颜色条 多组散点 1 散点图 基础 代码 import matplotlib pyplot as plt import numpy as np 第一组散点 x np array 1 2 3 4 5 6
  • 在C++上利用onnxruntime (CUDA)和 opencv 部署模型onnx

    概述 将得到的模型转化为onnx模型 加载到c 中运行 来完成模型的部署 下载并安装onnxruntime CMakeLists txt cmake minimum required VERSION 2 8 project test 使用c
  • 一起学nRF51xx 10 -  rng

    前言 随机数产生器 RNG 的结构 随机数发生器 RNG 根据内部热产生真实的非确定性随机数噪音 RNG通过触发START任务启动 并通过触发STOP任务停止 当随机数已经生成 它会产生一个VALRDY事件 同时把随机数存入VALUE寄存器
  • 智慧城市领域大单,巨头占尽优势

    智慧城市领域 哪个公司做的比较好 一 前言 二 智慧城市中标大单 清单 三 中标厂商分析 1 华为 2 科大讯飞 3 腾讯 4 阿里 5 中国电科 6 中国电子 7 百度 8 数字广东 四 获取 智慧城市等全套最新解决方案合集 一 前言 在
  • python eclipse+pydev(An error has occurred when creating this preference page)

    Eclipse 安装pydev Help gt Install New Software gt add gt Location http pydev org updates 点击pydev左边的小三角勾选pydev for eclipse
  • Shell init Ubuntu

    echo HISTFILESIZE 99999 gt gt bashrc echo HISTSIZE 99999 gt gt bashrc echo HISTTIMEFORMAT F T gt gt bashrc echo PROMPT C
  • Thrift原理简析(JAVA)

    Apache Thrift是一个跨语言的服务框架 本质上为RPC 同时具有序列化 反序列化机制 当我们开发的service需要开放出去的时候 就会遇到跨语言调用的问题 JAVA语言开发了一个UserService用来提供获取用户信息的服务
  • CUDA编程 基础与实践 学习笔记(十)

    线程束 warp 一个GPU由多个SM组成 一个SM上可以放多个线程块 不同线程块之间并行或顺序执行 一个线程块分为多个线程束 一个线程束由32个线程 有连续的线程号 组成 从更细粒度来看 一个SM以一个线程束为单位产生 管理 调度 执行线
  • Java面向对象 - 封装、继承和多态

    第1关 什么是封装 如何使用封装 相关知识 为了完成本关任务 你需要掌握 1 什么是封装 2 封装的意义 3 实现Java封装的步骤 package case1 public class TestPersonDemo public stat
  • GoLang之”奇怪用法“实践总结

    2013 11 23 wcdj 0 摘要 本文通过对A Tour of Go的实践 总结Go语言的基础用法 1 Go语言 奇怪用法 有哪些 1 go的变量声明顺序是 先写变量名 再写类型名 此与C C 的语法孰优孰劣 可见下文解释 http
  • 销售心理学

    销售中的心理学 影响你一生的销售心理学书籍 要想钓到鱼 就要像鱼一样思考 在生活中 如果想钓到鱼 你就得像鱼那样思考 而不是像渔夫那样思考 当你对鱼了解得越多 你也就越来越会钓鱼了 这样的想法用在销售中同样适用 要知道 销售的过程其实就是销
  • 【Redis17】Redis进阶:管道

    Redis进阶 管道 管道是啥 我们做开发的同学们经常会在 Linux 环境中用到管道命令 比如 ps ef grep php 在之前学习 Laravel框架时的 Laravel6 4 管道过滤器https mp weixin qq com
  • Latex使用

    问题 在使用latex的过程中插入图片 在某些条件下 图片可能会出现越过后续的文字出现在下一页的页首 解决办法 在该tex文件首部加上 usepackage stfloats 然后参数设置成H如下 begin figure H center
  • 使用frp 实现内网穿透 & 将私人电脑变成一个服务器

    使用frp 实现内网穿透 frp 是什么 frp 是一个可用于内网穿透的高性能的反向代理应用 支持 tcp udp 协议 为 http 和 https 应用协议提供了额外的能力 且尝试性支持了点对点穿透 作用 比如你需要用到云服务器部署你的
  • 阅读GFS论文

    GFS论文发表距今已经十几年了 据之开源的hdfs也已经在业界得到了广泛应用 为了取得分布式系统的真经 拜读一下这篇经典论文 重要假设 软硬件失败乃家常便饭 我们写大文件 不屑小文件 文件改动的主流是追加新数据 随机写是非主流 一旦写完 仅
  • Neon Instruction C支持的向量运算

    转载请标明出处 https blog csdn net u013752202 article details 92008843 文章目的 快速索引到需要的向量运算 vadd gt ri ai bi 1 Vector add 正常指令 r a