nanomsg库下载安装和使用模式

第三方库介绍——nanomsg(高性能通信库) 高性能通信库——nanomsg(含交叉编译) 阅读详情

1.概述

nanomsg库是几个“可伸缩性协议”的简单高性能实现。这些可伸缩性协议是轻量级的消息传递协议,可用于解决许多非常常见的消息传递模式,如请求/应答、发布/订阅、测量者/应答者等。这些协议可以在各种传输上运行,如TCP、UNIX套接字,甚至WebSocket。

2.下载和安装

2.1.下载地址

https://github.com/nanomsg/nanomsg
当前版本:1.1.5, released on October 15, 2018.

2.2 POSIX (Linux, MacOS X, UNIX)安装准备

ANSI C compiler supporting C89
POSIX pthreads (should be present on all modern POSIX systems)
BSD sockets support for both TCP and UNIX domain sockets
CMake (http://cmake.org) 2.8.7 or newer, available in $PATH as cmake

2.2.4.Ubuntu编译

安装cmake
sudo snap install cmake(sudo snap install cmake --classic)
官方描述的编译步骤

  1. md build
  2. cd build
  3. cmake ..
  4. cmake --build . --config Debug
  5. ctest -C Debug .
nanomsg 高性能通信库_NanoMsg框架|NanoMsg的简介 NanoMsg简介: NanoMsg是一个Socket的通讯库,使用C语言编写实现的,这样就可以适用于多种操作系统,而且几乎不需要什么依赖,可扩展并且能易于使用。 Nanomsg提供了几种常见的通信模式 ( 也称为“可扩展性协议” ) 是构建分布式系统的基本框架。 通过组合它们,可以创建广 泛的分布式应用程序。 可扩展性协议类型 类型 说明 PAIR 简单的一对一沟通 BUS 简单的多对多通信 REQREP 允许构建无状态集群来处理用户请求 PUBSUB 将消息分发给订阅消息的用 阅读详情

相关推荐

一文入门Nanomsg通信库

详细介绍了Nanomsg通信库,一文便可入门

空名的博客——云深知处 6060

ZeroMQ和NanoMSG的选择/对比

转载自本人博客:https://www.jjy2023.cn/2024/06/10/zeromq%e5%92%8cnanomsg%e7%9a%84%e9%80%89%e6%8b%a9-%e5%af%b9%e6%af%94/以前一直在使用ZeroMQ库处理通信,但因为最近需要做一个一对多的双向实时通信,ZeroMQ提供的几种通信模式就难以很好地实现,于是就去寻找其他的库,比如NanoMsg库。在我实际使用中,这两个库有着很大不同,下面我列出几点我使用时最注意的几点,之后如有新的理解再更新。

空名的博客——云深知处 1478

四种环境下编译nanomsg库

VS2013编译生成nanomsg库 MinGW编译生成nanomsg库 Ubuntu下编译生成nanomsg库 交叉编译环境下生成nanomsg库

onlyshi的专栏 4822

nanomsg-1.15.zip

visual studio 2019编译的nanomsg-1.15的64位库文件 nanomsg.dll和nanomsg.lib。

智能环境感知:STM32多传感器数据融合与报警策略设计

本文详细介绍了基于STM32的多传感器数据融合系统设计,整合DHT11温湿度传感器、MQ-2烟雾检测和光照强度检测模块,通过智能算法实现环境感知与动态报警。系统采用数据滤波、多传感器校验和自适应阈值策略,显著提升监测精度与可靠性,并通过OLED显示屏提供清晰的多级报警界面。

plant的博客 200

【UE5_蓝图】实时音频采集与动态WAV文件保存实战指南

本文详细介绍了在UE5中使用蓝图实现实时音频采集与动态WAV文件保存的完整流程。从插件配置、录音框架搭建到动态文件名生成和音频参数优化,提供了实用技巧和常见问题解决方案,特别适合需要快速实现音频采集功能的开发者。

weixin_29009669的博客 407

STM32异常与中断过程详解

1. 异常与中断概念引入 异常主要是指来自CPU内部的意外事件,比如执行了未定义指令、算术溢出、除零运算等发生在CPU内部的意外事件,这些异常的发生,会引起CPU运行相应的异常处理程序;中断一般来自硬件(如片上外设、外部I/O输入等)发生的事件,当这些硬件产生中断信号时,CPU会暂停当前运行的程序,转而去处理相关硬件的中断服务程序。但无论是异常还是中断,都会引起程序执行偏离正常的流程,转而去执行异常/中断的处理函数。 下面对异常和中断的介绍,如果中断信号的产生原因来自CPU内部,则称之为异常;如果中断信号来

luobeihai的博客 1万+

c语言串口编程详解

串口: 一种异步通信接口,通常用于低速数据传输。RS-232: 最常见的串口标准,定义了电气特性、连接器和信号线。UART: 通用异步收发传输器,是实现串口通信的硬件模块。通过以上内容,你应能够理解并实现C语言在Windows和Linux平台上的串口编程。希望这本手册能帮助你在实际项目中顺利进行串口通信开发。如果有任何疑问或需要进一步的帮助,请随时提问。

jkzyx123的博客 2224

永磁同步电机解耦控制实战:从电流反馈到内模解耦的算法演进与选型指南

本文深入探讨了永磁同步电机高性能驱动中的核心挑战——交叉耦合问题,并对比分析了电流反馈解耦和内模解耦两大主流算法的原理、性能与适用场景。文章指出,电流反馈解耦动态响应快但对参数敏感,内模解耦鲁棒性更强但略有滞后,为工程师在不同应用需求下的算法选型提供了清晰的实战指南。

weixin_29039773的博客 264

从STM32转战STC32G?逐飞开源库帮你快速上手GPIO、PWM与ADC(避坑指南)

本文详细介绍了从STM32迁移到STC32G32K128的开发实践,重点解析了GPIO、PWM和ADC等基础外设的设计差异,并提供了基于逐飞开源库的高效应用方案。通过对比两种平台的开发工具和操作方式,帮助开发者快速上手STC32G,避免常见陷阱,提升开发效率。

weixin_30316097的博客 529

手把手教你玩转RISC-V指令集​​​专栏--​​1.2 对比x86/ARM:RISC-V的三大核心优势(开放、灵活、可扩展)​

​:RISC-V以“开放打破垄断、灵活适配场景、扩展定义未来”的三大优势,正在重塑计算架构格局。其核心价值不仅是技术革新,更是对全球半导体产业链话语权的重新分配。

amy_mhd的博客 130

60、拓扑码:从理论到应用

本博客深入探讨了拓扑码的基本理论、构造方法及其在量子计算中的应用。重点介绍了颜色码的拓扑起源、编码量子比特的计算方法、弦算子的构造与性质、边界条件的影响、同调描述以及与统计模型相关的错误阈值分析。同时,还涵盖了拓扑码的历史发展、与其他拓扑码的关系、与凝聚态系统的联系,以及其在激发态和高维中的表现。博客展示了拓扑码在容错量子计算和未来量子信息领域的广阔前景。

o1p2q3r的博客 129

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

上一篇: MQTT开源库mosquitto安装和使用(一)
下一篇: MQTT开源库mosquitto安装和使用(二)
skytering
博客等级 码龄18年 33粉丝 54原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值