<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: A Serputov</title>
    <description>The latest articles on DEV Community by A Serputov (@serputov).</description>
    <link>https://dev.to/serputov</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F752345%2F8320b062-39ca-443d-92f7-98c16174feef.jpg</url>
      <title>DEV Community: A Serputov</title>
      <link>https://dev.to/serputov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/serputov"/>
    <language>en</language>
    <item>
      <title>AWS Simple Email Service + Serverless Vercel + Node.js Deploy&amp;Receive Emails For Free</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Sun, 12 Jun 2022 18:27:33 +0000</pubDate>
      <link>https://dev.to/serputov/aws-simple-email-service-serverless-vercel-nodejs-deployreceive-emails-for-free-380h</link>
      <guid>https://dev.to/serputov/aws-simple-email-service-serverless-vercel-nodejs-deployreceive-emails-for-free-380h</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is a quick guide: On How To Deploy(Create) Node.js Server With AWS SES on Vercel(Heroku, Netlify, e.t.c)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Our Code will Send A Confirmation Email On Form Submission.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create A Server
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require("express");
const path = require("path");
const bodyParser = require("body-parser");
const app = express();
const port = process.env.PORT || 8080;

app.get("/home", function (req, res) {
  res.sendFile(path.join(__dirname, "/index.html"));
});

app.listen(port);

console.log("Server started at http://localhost:" + port);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We don't need Post Routes anymore.&lt;/p&gt;

&lt;p&gt;HTML&amp;gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div&amp;gt;Works!&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Setup AWS Simple Email Notification Service.
&lt;a href="https://us-east-1.console.aws.amazon.com/ses/home?region=us-east-1#/homepage"&gt;https://us-east-1.console.aws.amazon.com/ses/home?region=us-east-1#/homepage&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DfLZAzSI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cxbz85aaadc6x9z6bj27.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DfLZAzSI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cxbz85aaadc6x9z6bj27.png" alt="Image description" width="880" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JnDlLOjS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aaq2ikeqabdn5vx764j8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JnDlLOjS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aaq2ikeqabdn5vx764j8.png" alt="Image description" width="880" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AtPMy9nu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h1oz4dtcv2jcab8c7t3i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AtPMy9nu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h1oz4dtcv2jcab8c7t3i.png" alt="Image description" width="880" height="497"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will need to confirm your email. &lt;/p&gt;

&lt;p&gt;Done. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In HTML we need to add &lt;code&gt;&amp;lt;form action="/api/hello" method="POST" style=" padding: 1%;margin-left:25%;width: 50%;"&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;/api/hello&lt;/code&gt; is the endpoint for Serverless in Vercel. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create Your Logic Inside hello.js file in api folder.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var aws = require("aws-sdk");

export default function hello(req, res) {
  const formData = req.body;
  console.log(req.body.name);

  aws.config.update({
    credentials: {
      accessKeyId: process.env.AWS_ACCESS_KEY_ID_MYAPP,
      secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY_MYAPP,
    },
    region: process.env.AWS_REGION_MYAPP,
  });

  // AWS.config.update({region: });

  var params = {
    Destination: {
      /* required */
      CcAddresses: [
        "ser****@gmail.com",
        /* more items */
      ],
      ToAddresses: [
        "serp****@gmail.com",
        "additionalemail@gmail.com",
        /* more items */
      ],
    },
    Message: {
      /* required */
      Body: {
        /* required */
        Text: {
          Charset: "UTF-8",
          Data: `${JSON.stringify(formData)}`,
        },
      },
      Subject: {
        Charset: "UTF-8",
        Data: "Test email",
      },
    },
    Source: "serp****@gmail.com" /* required */,
    ReplyToAddresses: [
      "serpu****@gmail.com",
      /* more items */
    ],
  };

  // Create the promise and SES service object
  var sendPromise = new aws.SES({ apiVersion: "2010-12-01" })
    .sendEmail(params)
    .promise();

  // Handle promise's fulfilled/rejected states
  sendPromise
    .then(function (data) {
      console.log(data.MessageId);
      res.status(200).send(`Hello Thank you!!`);
    })
    .catch(function (err) {
      console.error(err, err.stack);
    });
  //   res.redirect("/home");
  //
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't FORGET to add env variables inside your Vercel Website.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Thanks For Reading.&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made out of my curiosity.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>opensource</category>
      <category>node</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Auto-Commiter. Controls your commits and GitHub.</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Sat, 23 Apr 2022 15:03:45 +0000</pubDate>
      <link>https://dev.to/serputov/auto-commiter-controls-your-commits-and-github-544</link>
      <guid>https://dev.to/serputov/auto-commiter-controls-your-commits-and-github-544</guid>
      <description>&lt;p&gt;Auto-committer. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/aserputov/auto"&gt;https://github.com/aserputov/auto&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is simple, but I think exciting project idea to make auto commits into your GitHub.&lt;/p&gt;

&lt;p&gt;How does it work?&lt;/p&gt;

&lt;p&gt;Small story.&lt;/p&gt;

&lt;p&gt;I use git a lot, it helps me manage projects, and I know that making small but meaningful commits is essential to you in future or for your team members. &lt;/p&gt;

&lt;p&gt;But, it's tough to do that every small block of code changes.&lt;/p&gt;

&lt;p&gt;There are many things you can do with Git and even more with API.&lt;/p&gt;

&lt;p&gt;I decided to create something that would commit for me.&lt;/p&gt;

&lt;p&gt;My problems:&lt;/p&gt;

&lt;p&gt;How to commit only the correct code that can be built. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We need to check the code before committing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Can we add a feature to check if we already have a repo there we want to commit, or should we create a new repo with the same name as a folder?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Yes, we can, but there will be problems with it because Github Api asks for a token to authenticate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Currently, I'm working with Node.js and kind of made a prototype. &lt;code&gt;npm commit&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I will add more in progress.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;⚠️ Computer Architecture Blog Post: Link&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for Telescope.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Memory Systems</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Fri, 22 Apr 2022 21:10:04 +0000</pubDate>
      <link>https://dev.to/serputov/memory-systems-51n9</link>
      <guid>https://dev.to/serputov/memory-systems-51n9</guid>
      <description>&lt;p&gt;Memory Systems.&lt;/p&gt;

&lt;p&gt;After searching online about hot field - memory systems, I found this great paper.  &lt;/p&gt;

&lt;p&gt;The &lt;em&gt;&lt;strong&gt;memory system&lt;/strong&gt;&lt;/em&gt; is the storage of information (data) in a computer system. The processor (also called the central processing unit, or CPU) accesses (reads or loads) data from the memory system, performs computations on them, and stores (writes) them back to memory. The memory system is a collection of storage locations. Each storage location, or memory word, has a numerical address. A collection of storage locations from an address space. Figure 1 shows the essentials of how a processor is connected to a memory system via address, data, and control lines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zyIxz5vo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88wdqx5o4e9zks56swv0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zyIxz5vo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88wdqx5o4e9zks56swv0.png" alt="Image description" width="880" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IEFtk361--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/85u734ap6w0c8kexe5cj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IEFtk361--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/85u734ap6w0c8kexe5cj.png" alt="Image description" width="880" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WbYFchL0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2dm191ivbzw1ak8um33u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WbYFchL0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2dm191ivbzw1ak8um33u.png" alt="Image description" width="880" height="814"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is work in progress. &lt;/p&gt;

&lt;p&gt;Resources:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.studytonight.com/computer-architecture/memory-organization"&gt;https://www.studytonight.com/computer-architecture/memory-organization&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.103.9197&amp;amp;rep=rep1&amp;amp;type=pdf"&gt;https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.103.9197&amp;amp;rep=rep1&amp;amp;type=pdf&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;It was a Great project to work on and a great course to learn about different ways to optimize code. &lt;/p&gt;

&lt;p&gt;Thank you, professor and readers!&lt;/p&gt;

&lt;p&gt;⚠️ Computer Architecture Blog Post: Link&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for Telescope.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>SPO 600 project part 3 - Analysis</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Fri, 22 Apr 2022 05:10:36 +0000</pubDate>
      <link>https://dev.to/serputov/spo-600-project-part-3-analysis-fol</link>
      <guid>https://dev.to/serputov/spo-600-project-part-3-analysis-fol</guid>
      <description>&lt;p&gt;Introduction &lt;/p&gt;

&lt;p&gt;This is the final part of our project to implement SVE2 instructions into an open-source project. Thank you for reading.&lt;/p&gt;

&lt;p&gt;If you didn't yet read the second, please see this &lt;a href="https://dev.to/aserputoff/spo600-project-part-2-4198"&gt;link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also, you can see the link to the repo here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/aserputov/std-simd" rel="noopener noreferrer"&gt;https://github.com/aserputov/std-simd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pull Request: &lt;a href="https://github.com/VcDevel/std-simd/pull/35" rel="noopener noreferrer"&gt;https://github.com/VcDevel/std-simd/pull/35&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this project, I did two different ways to work with SVE2.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Autovectorization&lt;/li&gt;
&lt;li&gt;Intrinsics&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Also, I have two different types of machines that help me test the library. &lt;/p&gt;

&lt;p&gt;We can't apply our instructions to all the files, but at least I tried something. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fahg95i4sobnehewwoeon.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fahg95i4sobnehewwoeon.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We don't have hardware for ARM9 yet, so we won't see many differences. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl300mmn2ok1gw3pbcetz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl300mmn2ok1gw3pbcetz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Added different variables to the project for SVE2. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz33jp6go0ccjufegos2r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz33jp6go0ccjufegos2r.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Update: after receiving feedback on project part 2.&lt;/p&gt;

&lt;p&gt;My initial idea was to work with autovectorization.&lt;/p&gt;

&lt;p&gt;As I see now there is no way to add autovectorization to my header library.&lt;/p&gt;

&lt;p&gt;That's why in the second part of my project, I decided to use intrinsics with SVE2.&lt;/p&gt;

&lt;p&gt;You can track my progress here:&lt;br&gt;
&lt;a href="https://github.com/VcDevel/std-simd/pull/35" rel="noopener noreferrer"&gt;https://github.com/VcDevel/std-simd/pull/35&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But now more on what was my idea with intrinsics:(Of course I found that it was super hard to do and I still in progress, but I think I did a small progress)&lt;/p&gt;

&lt;p&gt;First step in my analysis: &lt;a href="https://developer.arm.com/documentation/100748/0616/SVE-Coding-Considerations-with-Arm-Compiler/Using-SVE-and-SVE2-intrinsics-directly-in-your-C-code" rel="noopener noreferrer"&gt;https://developer.arm.com/documentation/100748/0616/SVE-Coding-Considerations-with-Arm-Compiler/Using-SVE-and-SVE2-intrinsics-directly-in-your-C-code&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Intrinsics are C or C++ pseudo-function calls that the compiler replaces with the appropriate SIMD instructions. These intrinsics let you use the data types and operations available in the SIMD implementation, while allowing the compiler to handle instruction scheduling and register allocation.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My code steps: &lt;/p&gt;

&lt;p&gt;Header file inclusion&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#ifdef __ARM_FEATURE_SVE
#include &amp;lt;arm_sve.h&amp;gt;
#endif /* __ARM_FEATURE_SVE */ 

// All functions and types that are defined in the header file have the prefix sv, to reduce the chance of collisions with other extensions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my code it's on line 51 &lt;a href="https://github.com/VcDevel/std-simd/blob/5a1ef0e3c5ccc36fbc4af8fb1ad8c89e6e6d0dd4/experimental/bits/simd.h#L51" rel="noopener noreferrer"&gt;https://github.com/VcDevel/std-simd/blob/5a1ef0e3c5ccc36fbc4af8fb1ad8c89e6e6d0dd4/experimental/bits/simd.h#L51&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SVE vector types.&lt;br&gt;
arm_sve.h defines the following C types to represent values in SVE vector registers. Each type describes the type of the elements within the vector:&lt;/p&gt;

&lt;p&gt;I updated a few variables types for now with Sve2 types. &lt;br&gt;
I'm still in progress, because it seems work is too big.&lt;br&gt;
(Note: I would like to mention that I created &lt;code&gt;constexpr&lt;/code&gt; for Sve2 to maybe future logic in std-simd library. I thought and still think it will help not a lot but at some points for SVE2.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;!Docs
Common situations where SVE types might be used include:

As the type of an object with automatic storage duration.
As a function parameter or return type.
As the type in a (type) {value} compound literal.
As the target of a pointer or reference type.
As a template type argument.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The&lt;br&gt;
SVE2 intrinsics&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;!Docs reference
To enable only the base SVE2 instructions, use the +sve2 option with the armclang -march or -mcpu options. To enable additional optional SVE2 instructions, use the following armclang options:

+sve2-aes to enable scalable vector forms of AESD, AESE, AESIMC, AESMC, PMULLB, and PMULLT instructions.
+sve2-bitperm to enable the BDEP, BEXT, and BGRP instructions.
+sve2-sha3 to enable scalable vector forms of the RAX1 instruction.
+sve2-sm4 to enable scalable vector forms of SM4E and SM4EKEY instructions.
You can use one or more of these options. Each option also implies +sve2. For example, +sve2-aes+sve2-bitperm+sve2-sha3+sve2-sm4 enables all base and optional instructions. For clarity, you can include +sve2 if necessary.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I got some kind of the point on how to the intrinsics, but I'm still looking there I can add them in this header library:&lt;br&gt;
Ex.(I use)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void daxpy_1_1(int64_t n, double da, double *dx, double *dy)
{
    for (int64_t i = 0; i &amp;lt; n; ++i) {
        dy[i] = dx[i] * da + dy[i];
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void daxpy_1_1(int64_t n, double da, double *dx, double *dy)
{
    int64_t i = 0;
    svbool_t pg = svwhilelt_b64(i, n);                                       // [1]
    do {
        svfloat64_t dx_vec = svld1(pg, &amp;amp;dx[i]);                     // [2]
        svfloat64_t dy_vec = svld1(pg, &amp;amp;dy[i]);                     // [2]
        svst1(pg, &amp;amp;dy[i], svmla_x(pg, dy_vec, dx_vec, da));         // [3]
        i += svcntd();                                              // [4]
        pg = svwhilelt_b64(i, n);                                   // [1]
    }
    while (svptest_any(svptrue_b64(), pg));                                   // [5]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://developer.arm.com/documentation/100987/0000/" rel="noopener noreferrer"&gt;https://developer.arm.com/documentation/100987/0000/&lt;/a&gt;&lt;br&gt;
I will progress with this work and update post.&lt;/p&gt;

&lt;p&gt;Also, because I didn't show auto-vectorization on practice in std-simd library and not actually build it, I decided to show that I have knowledges on how it works, and used one extra library, to apply them():&lt;/p&gt;

&lt;p&gt;My choice fall on this project: &lt;br&gt;
&lt;a href="https://github.com/cisco/openh264" rel="noopener noreferrer"&gt;https://github.com/cisco/openh264&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was easy to build and test on different machines, because except Israel and Portugal servers I also had my own arm64 and x86 local machines. &lt;/p&gt;

&lt;p&gt;Here : &lt;code&gt;make OS=ios ARCH=**ARCH**&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;!DOCS

Valid values for **ARCH** are the normal iOS architecture names such as armv7, armv7s, arm64, and i386 and x86_64 for the simulator. Another settable iOS specific parameter is SDK_MIN, specifying the minimum deployment target for the built library. For other details on building using make on the command line, see 'For All Platforms' below.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flpxp9bslcli2jjzvvw0i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flpxp9bslcli2jjzvvw0i.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctv5wetn8iotm1g4g8kq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctv5wetn8iotm1g4g8kq.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After with &lt;code&gt;find&lt;/code&gt; command we found this executable files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
-rw-r--r--   1 anatoliyserputov  staff   443656 libcommon.a
-rw-r--r--   1 anatoliyserputov  staff     8160 libconsole_common.a
-rw-r--r--   1 anatoliyserputov  staff  1604152 libdecoder.a
-rw-r--r--   1 anatoliyserputov  staff  2019888 libencoder.a
-rw-r--r--   1 anatoliyserputov  staff  4444584 libopenh264.a
-rw-r--r--   1 anatoliyserputov  staff   377176 libprocessing.a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, I built it using &lt;code&gt;make ARCH=arm64&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgnvcd8q1rzrft6ifkiga.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgnvcd8q1rzrft6ifkiga.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And, on Israel&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F971lu8jo3wqsjom9pwsg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F971lu8jo3wqsjom9pwsg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, it's time to test.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;testbin/CmdLineExample.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/cisco/openh264" rel="noopener noreferrer"&gt;https://github.com/cisco/openh264&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we only need to run it with &lt;code&gt;qemu-aarch64&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;It was a Great project to work on and a great course to learn about different ways to optimize code. &lt;/p&gt;

&lt;p&gt;Thank you, professor and readers!&lt;/p&gt;

&lt;p&gt;⚠️ Computer Architecture Blog Post: Link&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for SPO600 class.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Telescope final release 3.0</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Tue, 19 Apr 2022 20:11:40 +0000</pubDate>
      <link>https://dev.to/serputov/telescope-final-release-30-4nck</link>
      <guid>https://dev.to/serputov/telescope-final-release-30-4nck</guid>
      <description>&lt;p&gt;Release 3.0&lt;/p&gt;

&lt;p&gt;We will push our final release in a few days, and I would like to talk about it. &lt;/p&gt;

&lt;p&gt;First of all, it was a great semester, and I worked with many different technologies included in Telescope architecture.&lt;/p&gt;

&lt;p&gt;Meeting and being Sheriff was my most loved part because it helped me improve my skills. &lt;/p&gt;

&lt;p&gt;Currently, I have one issue left regarding Nginx. I hope to finish by the end of the semester.&lt;/p&gt;

&lt;p&gt;I hope that we will successfully launch our 3.0 release and slowly move to the following heights. &lt;/p&gt;

&lt;p&gt;Lastly, Thank you to every team member and professor I worked with on OSD and Telescope. &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;⚠️ Computer Architecture Blog Post: Link&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for Telescope.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>SPO600 project part 2</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Wed, 13 Apr 2022 20:45:27 +0000</pubDate>
      <link>https://dev.to/serputov/spo600-project-part-2-4198</link>
      <guid>https://dev.to/serputov/spo600-project-part-2-4198</guid>
      <description>&lt;p&gt;For those who don't remember, I'm currently working on a project to implement SVE2 instructions into an open-source project. &lt;/p&gt;

&lt;p&gt;In the last part, I was looking for an excellent candidate to which we could add SVE2 instruction. &lt;/p&gt;

&lt;p&gt;This part will look into the open-source directory and see how we can implement scalable vector extensions. &lt;/p&gt;

&lt;p&gt;First of all, I previously decided to work with the VC library on our project.&lt;a href="https://github.com/VcDevel/Vc"&gt;https://github.com/VcDevel/Vc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After searching around, I found that this repository has a better project than SSE and Neon.&lt;/p&gt;

&lt;p&gt;STD-SIMD is almost the same project I was working on but a bit more advanced: &lt;a href="https://github.com/VcDevel/std-simd"&gt;https://github.com/VcDevel/std-simd&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here, you can see my progress: with the maintainer team and the progress I'm making:&lt;/p&gt;

&lt;p&gt;Issue-1:&lt;a href="https://github.com/VcDevel/Vc/issues/320"&gt;https://github.com/VcDevel/Vc/issues/320&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Issue-2:&lt;a href="https://github.com/VcDevel/std-simd/issues/34"&gt;https://github.com/VcDevel/std-simd/issues/34&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pull-Request: &lt;a href="https://github.com/VcDevel/std-simd/pull/35"&gt;https://github.com/VcDevel/std-simd/pull/35&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I started by cloning the repo and searching through the code:&lt;/p&gt;

&lt;p&gt;Are there SIMD instructions? Yes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IxXFRIl8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrhnrjtr6n153wlb8v74.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IxXFRIl8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrhnrjtr6n153wlb8v74.png" alt="Image description" width="880" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Is there SVE? No.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AZ1P6zwX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qahaoqxgrs60i4yplprk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AZ1P6zwX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qahaoqxgrs60i4yplprk.png" alt="Image description" width="880" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But there is SSE. Yes.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lCLQL4j8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kv2aqtxza606sag3j9tf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lCLQL4j8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kv2aqtxza606sag3j9tf.png" alt="Image description" width="880" height="622"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is also AVX.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uNuVgzyK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xa78gvug1ooqkodx46xl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uNuVgzyK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xa78gvug1ooqkodx46xl.png" alt="Image description" width="880" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, let's check for architecture.&lt;br&gt;
X86. Yes.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q5swYm8Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/svcp79qs1jfad5r1vrda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q5swYm8Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/svcp79qs1jfad5r1vrda.png" alt="Image description" width="880" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ARM/ARM64. No&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sX25ahWP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dojupk3zlvoqxv6fgfu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sX25ahWP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dojupk3zlvoqxv6fgfu7.png" alt="Image description" width="880" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2E3K3cFP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5fmjmn7haw6uftvka0l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2E3K3cFP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5fmjmn7haw6uftvka0l.png" alt="Image description" width="880" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After I checked all the files, I decided to start implementing the code:&lt;br&gt;
There were no .s .S files which made it a bit scary, but I have a plan. &lt;br&gt;
It will be some If&amp;amp;def that will switch between existing x86 functions to arm/arm64. I'm going to try to implement SVE2 with arm/64. &lt;/p&gt;

&lt;p&gt;What options do I have: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;auto-vectorization &lt;/li&gt;
&lt;li&gt;intrinsics&lt;/li&gt;
&lt;li&gt;inline-assembly&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's see what we can do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;For auto-vectorization, it's needed to change the build instructions, but it won't be specific and as our professor said C compiler can't always know what to do. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Intrinsics and Inline-assembly are complicated to include because it's not only a build instruction but a change in a source code. As I looked a bit through the code, it has intrinsic inside it, defined as macros. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BiExP2GB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfgbkq0jh6zgstwg4bob.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BiExP2GB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfgbkq0jh6zgstwg4bob.png" alt="Image description" width="562" height="1032"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, I found our If statement for different instructions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;simd.c 
#if _GLIBCXX_SIMD_X86INTRIN
#include "bits/simd_x86.h"
#elif _GLIBCXX_SIMD_HAVE_NEON
#include "bits/simd_neon.h"
#elif __ALTIVEC__
#include "bits/simd_ppc.h"
#endif
#include "bits/simd_math.h"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I've decided to start with auto-vectorization and work a bit with arm/arm64 inline assembly or intrinsics if I have time.&lt;/p&gt;

&lt;p&gt;I want to note that we won't have a chance to see an increase in time because we don't have the hardware yet, but lets at least &lt;strong&gt;prepare&lt;/strong&gt; our code and build it successfully.&lt;/p&gt;

&lt;p&gt;I just read through the library instructions for auto-vectorization and tried to build on different machines, simply adding the flags to my build.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcc -O3 -march=armv8-a+sve2 ... // 03 flag to enable auto-vectorization

gcc -O2 -march=armv8-a+sve2 -ftree-vectorize ... // or -ftre...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I have an arm64 and x86 local computer, so I checked on both machines, and everything was built. But as mentioned above, we can't see the difference because of hardware, but at least we know it will work in the future new architecture.&lt;/p&gt;

&lt;p&gt;In addition to this, I decided to dive deeper into the code and maybe at least try adding intrinsics for sve2. &lt;/p&gt;

&lt;p&gt;Here, you can see all the progress. I have already changed a few files. Include header:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;arm_sve.h&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And wrote an ifdef statement to switch between different architecture and instructions. &lt;/p&gt;

&lt;p&gt;I will progress on this more until part three and after, so maybe the maintainer could accept my changes into their code. &lt;/p&gt;

&lt;p&gt;Pull-Request: &lt;a href="https://github.com/VcDevel/std-simd/pull/35"&gt;https://github.com/VcDevel/std-simd/pull/35&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o2AvW_fB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cs1et2zu1vbtblfp2dwo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o2AvW_fB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cs1et2zu1vbtblfp2dwo.png" alt="Image description" width="880" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;References: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.arm.com/documentation/100987/0000/"&gt;https://developer.arm.com/documentation/100987/0000/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiessimdisa=%5Bsve2%5D"&gt;https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiessimdisa=[sve2]&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;⚠️ Pull-Request: &lt;a href="https://github.com/VcDevel/std-simd/pull/35"&gt;https://github.com/VcDevel/std-simd/pull/35&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for my Software Portability and Optimization class. project part2&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How React-Native Cross-Platform Works?</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Tue, 29 Mar 2022 04:09:37 +0000</pubDate>
      <link>https://dev.to/serputov/how-react-native-cross-platform-works-8la</link>
      <guid>https://dev.to/serputov/how-react-native-cross-platform-works-8la</guid>
      <description>&lt;p&gt;React-Native. &lt;a href="https://github.com/facebook/react-native"&gt;https://github.com/facebook/react-native&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This Blog Post started as a curiosity on how cross-platforming features work in React Native, but while &lt;a href="https://betterprogramming.pub/react-native-under-the-hood-281df5f548f"&gt;researching&lt;/a&gt;, I discovered that this blog post should be a work in progress about something more.&lt;/p&gt;

&lt;p&gt;About &lt;a href="https://webkit.org"&gt;https://webkit.org&lt;/a&gt; WebKit engine.&lt;br&gt;
About hidden JavaScriptCore framework. &lt;a href="https://www.cyberark.com/resources/threat-research-blog/the-mysterious-realm-of-javascriptcore"&gt;https://www.cyberark.com/resources/threat-research-blog/the-mysterious-realm-of-javascriptcore&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/WebKit/webkit/tree/main/Source/JavaScriptCore"&gt;https://github.com/WebKit/webkit/tree/main/Source/JavaScriptCore&lt;/a&gt; &lt;br&gt;
About Why every browser switching to Blink could be bad news for the web &lt;a href="https://medium.com/@stouff.nicolas/why-every-browser-switching-to-blink-could-be-bad-news-for-the-web-aea773059e84"&gt;https://medium.com/@stouff.nicolas/why-every-browser-switching-to-blink-could-be-bad-news-for-the-web-aea773059e84&lt;/a&gt;&lt;br&gt;
About Gecko.&lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Gecko"&gt;https://developer.mozilla.org/en-US/docs/Glossary/Gecko&lt;/a&gt;&lt;br&gt;
About Chrominum&amp;amp;V8&amp;amp;Blink. &lt;a href="https://www.chromium.org/chromium-projects/"&gt;https://www.chromium.org/chromium-projects/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://v8.dev"&gt;https://v8.dev&lt;/a&gt;&lt;br&gt;
How I decided to switch for only Chrominium based architecture browsers.&lt;br&gt;
I will call this blog post a work in progress. &lt;br&gt;
There are a lot of things to research. &lt;br&gt;
If you're curious how cross-platform systems work, across Linux,osx, windows, ios, android or different processors, leave a comment or ideas. Thanks.&lt;br&gt;
p.s I knew JavaScript was weird, but why so why sooooo odd. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.cyberark.com/wp-content/uploads/2021/03/Figure1.png"&gt;https://www.cyberark.com/wp-content/uploads/2021/03/Figure1.png&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;TL;DR&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⚠️ Next Blog Post.&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;_p.s This post was made out of my curiosity&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Telescope. 3.0-alpha</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Tue, 29 Mar 2022 02:23:01 +0000</pubDate>
      <link>https://dev.to/serputov/telescope-30-alpha-jfg</link>
      <guid>https://dev.to/serputov/telescope-30-alpha-jfg</guid>
      <description>&lt;p&gt;We successfully landed the 2.9 release, and now we focus on the alpha-3.0 release. I am glad to share that our small team fixed all the bugs for Eslint and created additional enhancements for eslint inside our monorepo tools. &lt;/p&gt;

&lt;p&gt;For this week, I will focus on the Docker file best practices issue to finish my part in the web repo. &lt;/p&gt;

&lt;p&gt;It's almost the end of the school year, and we are all focused on peacefully landing our Telescope 3.0  release.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;⚠️ Computer Architecture Blog Post: Link&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for Telescope.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>SVE2. ARM9.</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Thu, 24 Mar 2022 02:10:59 +0000</pubDate>
      <link>https://dev.to/serputov/sve2-arm9-4o79</link>
      <guid>https://dev.to/serputov/sve2-arm9-4o79</guid>
      <description>&lt;p&gt;Explore the New Armv9 Decade.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdb96b7eyyiu1nmgvru7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdb96b7eyyiu1nmgvru7.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The most significant new feature with new Armv9 compatible CPUs that will be directly observable to developers and users is the baselining of SVE2 as a successor to NEON.&lt;/p&gt;

&lt;p&gt;The Armv9 Scalable Vector Extensions version 2 (SVE2) provides variable-width SIMD credentials for AArch64 systems.&lt;/p&gt;

&lt;p&gt;In its first implementation, Scalable Vector Extensions, or SVE, was announced back in 2016 and implemented for the first time in Fujitsu's A64FX CPU cores, now powering the world's #1 supercomputer Fukagu in Japan. The problem with SVE was that this first iteration of the new variable vector length SIMD instruction set was somewhat limited in scope and aimed more at HPC workloads, missing many of the more versatile instructions covered by NEON.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff6c8ikhm2imwjpjoy6b9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff6c8ikhm2imwjpjoy6b9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SVE2 was announced in April 2019 and looked to solve this issue by complementing the new scalable SIMD instruction set with the needed instructions to serve more varied DSP-like workloads that currently use NEON.&lt;/p&gt;

&lt;p&gt;The benefit of SVE and SVE2 beyond the addition of various modern SIMD capabilities is their variable vector size, ranging from 128b to 2048b, allowing variable 128b granularity of vectors, irrespective of the actual actuality hardware is running on. Purely from a view of vector processing and programming, a software developer would only ever have to compile his code once. If in the future a CPU would come out with, say, native 512b SIMD execution pipelines, the code would be able already to take advantage of the entire width of the units. Similarly, the same principle would be able to run on more conservative designs with a lower hardware execution width capability, which is essential to Arm as they design CPUs from IoT to mobile to datacentres. It also does this all while remaining within the 32b encoding space of the Arm architecture. In contrast, alternative implementations such as x86 have to add new extensions and instructions depending on vector size.&lt;/p&gt;
&lt;h2&gt;
  
  
  Building SVE2 Code
&lt;/h2&gt;

&lt;p&gt;To build code that includes SVE2 instructions, you will need to instruct the compiler or assembler to emit code for an Armv8a processor that also understands the SVE2 instructions; this is performed using the -march= option (which is read as "machine architecture"). The architecture specification for this target is currently "armv8-a+sve2":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcc -march=armv8-a+sve2 ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember that to invoke the auto vectorizer in GCC version 11. It would help if you used -O3:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcc -O3 -march=armv8-a+sve2 ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using SVE2 Intrinsics Header Files
&lt;/h2&gt;

&lt;p&gt;To use SVE2 intrinsics in a C program, include the header file arm_sve.h:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;arm_sve2.h&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Running SVE2 Code
&lt;/h2&gt;

&lt;p&gt;To run SVE2 code on an Armv8 system, you can use the QEMU user-mode system. This will trap SVE2 instructions and emulate them in software while executing Armv8a instructions directly on the hardware:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;qemu-aarch64 ./binary

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This blog post is work in progress;&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.arm.com/campaigns/arm-vision" rel="noopener noreferrer"&gt;https://www.arm.com/campaigns/arm-vision&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.anandtech.com/show/16584/arm-announces-armv9-architecture" rel="noopener noreferrer"&gt;https://www.anandtech.com/show/16584/arm-announces-armv9-architecture&lt;/a&gt;&lt;br&gt;
&lt;a href="https://developer.arm.com/documentation/ddi0602/2021-12/" rel="noopener noreferrer"&gt;https://developer.arm.com/documentation/ddi0602/2021-12/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;⚠️ Computer Architecture Blog Post: Link&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for my Software Portability and Optimization class.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Inline Assembly Language. What is that?</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Wed, 23 Mar 2022 18:29:42 +0000</pubDate>
      <link>https://dev.to/serputov/inline-assembly-language-what-is-that-f9c</link>
      <guid>https://dev.to/serputov/inline-assembly-language-what-is-that-f9c</guid>
      <description>&lt;p&gt;An &lt;strong&gt;inline assembler&lt;/strong&gt; is a part of some compilers that permits &lt;strong&gt;low-level code&lt;/strong&gt; written in &lt;strong&gt;assembly language&lt;/strong&gt; to be &lt;strong&gt;embedded&lt;/strong&gt; within a program, among code that otherwise has compiled from a higher-level language &lt;strong&gt;such as C&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;The embedding of &lt;strong&gt;assembly language&lt;/strong&gt; code is usually done for one of these reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Optimization.&lt;/li&gt;
&lt;li&gt;Pass to processor-specific instructions.&lt;/li&gt;
&lt;li&gt;Pass to certain calling conventions not yet supported by the compiler.&lt;/li&gt;
&lt;li&gt;System calls and interrupts: High-level languages rarely have a direct facility to make arbitrary system calls, so assembly code is used. &lt;/li&gt;
&lt;li&gt;To emit special directives for the linker or assembler, such as changing sectioning, macros, or making symbol aliases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Demonstrates &lt;strong&gt;two kinds of inline assembly&lt;/strong&gt; syntax offered by the GCC compiler. This program will only work correctly on the x86-64 platform under Linux.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;

extern int func(void);
// the definition of func is written in assembly language
__asm__(".globl func\n\t"
        ".type func, @function\n\t"
        "func:\n\t"
        ".cfi_startproc\n\t"
        "movl $7, %eax\n\t"
        "ret\n\t"
        ".cfi_endproc");

int main(void)
{
    int n = func();
    // gcc's extended inline assembly
    __asm__ ("leal (%0,%0,4),%0"
           : "=r" (n)
           : "0" (n));
    printf("7*5 = %d\n", n);
    fflush(stdout); // flush is intentional

    // standard inline assembly in C++
    __asm__ ("movq $60, %rax\n\t" // the exit syscall number on Linux
             "movq $2,  %rdi\n\t" // this program returns 2
             "syscall");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;7*5 = 35
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;_Inline assembler poses a direct concern for the compiler as it confuses the breakdown of what is done to individually variable, a crucial piece of register allocation. It represents the performance might fall. The inline assembler also complicates future porting and maintenance of a program.&lt;/p&gt;

&lt;p&gt;Alternative structures are often provided to simplify the job for both the compiler and the programmer. Most compilers offer intrinsic functions for special instructions, and C-function wrappers for arbitrary system calls are available on every Unix platform._&lt;/p&gt;

&lt;p&gt;Usually, "intrinsics" guides to built-in functions -- i.e. most common library functions that the compiler can/will cause inline rather than calling a fundamental function in the library. For instance, a call like memset(array1, 10, 0) could compile for an x86 as something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mov ecx, 10
 xor eax, eax
 mov edi, offset FLAT:array1
 rep stosb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Intrinsics like this are purely an optimization. "Needing" intrinsics would most likely be when the compiler helps intrinsics that allow you to develop code that the compiler can't (or usually won't) generate directly. For an obvious example, quite a few compilers for x86 have "MMX Intrinsics" that let you use "functions" that are just direct representations of MMX instructions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Are there Intrinsics or inline assembly with JavaScript.
&lt;/h2&gt;

&lt;p&gt;Honestly, I searched a lot about this question and found only this information. I will leave this blog post as a work in progress for now. If you have comments, please share them. Thank you, I appreciate any help with this research.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/WebAssembly/design/issues/1206"&gt;https://github.com/WebAssembly/design/issues/1206&lt;/a&gt;&lt;br&gt;
&lt;a href="https://webassembly.org"&gt;https://webassembly.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/12168575/executing-generated-assembler-inline"&gt;https://stackoverflow.com/questions/12168575/executing-generated-assembler-inline&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://wiki.cdot.senecacollege.ca/wiki/Inline_Assembly_Language"&gt;https://wiki.cdot.senecacollege.ca/wiki/Inline_Assembly_Language&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.cppreference.com/w/c/language/asm"&gt;https://en.cppreference.com/w/c/language/asm&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Inline_assembler"&gt;https://en.wikipedia.org/wiki/Inline_assembler&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/2268562/what-are-intrinsics"&gt;https://stackoverflow.com/questions/2268562/what-are-intrinsics&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.codeproject.com/Articles/15971/Using-Inline-Assembly-in-C-C"&gt;https://www.codeproject.com/Articles/15971/Using-Inline-Assembly-in-C-C&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/48518225/what-are-intrinsic-types-in-javascript"&gt;https://stackoverflow.com/questions/48518225/what-are-intrinsic-types-in-javascript&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/12168575/executing-generated-assembler-inline"&gt;https://stackoverflow.com/questions/12168575/executing-generated-assembler-inline&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/v8/v8/blob/master/src/objects/dictionary.h"&gt;https://github.com/v8/v8/blob/master/src/objects/dictionary.h&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;⚠️ Computer Architecture Blog Post: Link&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for my Software Portability and Optimization class.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>computerscience</category>
      <category>webdev</category>
    </item>
    <item>
      <title>SPO600 project part 1</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Tue, 22 Mar 2022 19:58:16 +0000</pubDate>
      <link>https://dev.to/serputov/spo600-project-part-1-5de5</link>
      <guid>https://dev.to/serputov/spo600-project-part-1-5de5</guid>
      <description>&lt;p&gt;First of all, let's talk about the project and what we should do for the first stage. &lt;/p&gt;

&lt;p&gt;This semester, the project involves adding SVE2 optimizations to an open-source software package.&lt;/p&gt;

&lt;p&gt;For the first part, we will go through these parts:&lt;br&gt;
(I decide not to rewrite the same documentation, you can read more about the rules of each part &lt;a href="https://wiki.cdot.senecacollege.ca/wiki/Winter_2022_SPO600_Project"&gt;here&lt;/a&gt;.)&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Identify some candidate open-source packages for optimization. &lt;/li&gt;
&lt;li&gt;Find the SIMD implementations in these packages.&lt;/li&gt;
&lt;li&gt;Select the package you want to work with.&lt;/li&gt;
&lt;li&gt;Create a strategy for your changes.&lt;/li&gt;
&lt;li&gt;Note how the community accepts contributions and engages with the community to discuss your proposed work.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Let's find some open-source candidates:
&lt;/h2&gt;

&lt;p&gt;I'm substantial open-source fun for almost two years now, and out of my curiosity, I decided first to check the libraries and software that I previously wanted to contribute. &lt;/p&gt;

&lt;p&gt;The most recent idea was to look through Curl and a few python libraries. Also, I decided to see the javascript web socket library. Still, after reading more tips on the lab, I thought it's much better to look through library-level packages only and better with c/c++ because it's easier to add assembly in one of these ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;auto-vectorization &lt;/li&gt;
&lt;li&gt;inline assembler &lt;/li&gt;
&lt;li&gt;intrinsicts.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Examples:
https://github.com/pandas-dev/pandas
https://github.com/booknlp/booknlp/find/main
https://github.com/optuna/optuna
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I've decided to switch to something better, and after a few hours of searching, I found this repository: &lt;br&gt;
&lt;code&gt;NSIMD https://github.com/agenium-scale/nsimd&lt;/code&gt;&lt;br&gt;
&lt;code&gt;FastDifferentialCoding https://github.com/lemire/FastDifferentialCoding&lt;/code&gt;&lt;br&gt;
&lt;code&gt;VS https://github.com/VcDevel/Vc&lt;/code&gt;&lt;br&gt;
&lt;code&gt;XSIMD https://github.com/xtensor-stack/xsimd&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I was shocked to find this project from google repo: &lt;br&gt;
&lt;a href="https://github.com/google/highway"&gt;https://github.com/google/highway&lt;/a&gt; and I even wrote an email to the owner repo to see what progress they did and everything about SIMD/SVE instructions inside the repo: &lt;/p&gt;

&lt;p&gt;I received a feedback: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tvdk0SMq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i50x0zk6gkqnrl0v3zi2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tvdk0SMq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i50x0zk6gkqnrl0v3zi2.png" alt="Image description" width="880" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;but unfortunately while receiving this email, I also saw that they already have SVE2 instructions:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nGit5P-a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8kie3rdvb8ausr6p1i3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nGit5P-a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8kie3rdvb8ausr6p1i3.png" alt="Image description" width="880" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's great to have some experience and implement the todos, but that's in a different blogPost.&lt;/p&gt;

&lt;p&gt;I decided to move on and came across these repositories:&lt;br&gt;
XSIMD &lt;a href="https://github.com/xtensor-stack/xsimd"&gt;https://github.com/xtensor-stack/xsimd&lt;/a&gt;&lt;br&gt;
VS &lt;a href="https://github.com/VcDevel/Vc"&gt;https://github.com/VcDevel/Vc&lt;/a&gt; &lt;br&gt;
Why?&lt;/p&gt;

&lt;h2&gt;
  
  
  Is there SIMD implementations in these packages?
&lt;/h2&gt;

&lt;p&gt;Yes, both of these repositories have SIMD instructions, but one of them only has arm instructions. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pLmT3DuA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgl0cosal8kplow6vv80.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pLmT3DuA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgl0cosal8kplow6vv80.png" alt="Image description" width="880" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Select the package you want to work with.
&lt;/h2&gt;

&lt;p&gt;About the package.&lt;br&gt;
Vc is portable, zero-overhead C++ types for explicitly data-parallel programming.&lt;/p&gt;

&lt;p&gt;I will work mainly with VC to implement the SVE2 instructions and work with XSIMD.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a strategy for your changes.
&lt;/h2&gt;

&lt;p&gt;For now, I have already forked their repo on GitHub and cloned it to my local VSCode. Now I will browse through the code to see what I can update, how their build process works, how the library works overall, and how to implement all the features for SVE2 instructions, like .h(header file) + script for build and so on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jjCv0Atk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4oncvhln3x4esdkau4px.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jjCv0Atk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4oncvhln3x4esdkau4px.png" alt="Image description" width="880" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Note how the community accepts contributions and engages with the community to discuss your proposed work.
&lt;/h2&gt;

&lt;p&gt;I will need to write the message on slack or an email to check if I can add SVE2 instructions to their repo. But as it's a GitHub repo, I hope they will check my updates simply with a new Pull Request.&lt;/p&gt;

&lt;p&gt;I created an Issue. Let's see how it will go:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/VcDevel/Vc/issues/320"&gt;https://github.com/VcDevel/Vc/issues/320&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also I will definitely spend time on google/highway. Please wait for my new blog about it as soon as possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;⚠️ Computer Architecture Blog Post: Link&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for my Software Portability and Optimization class. Lab 6.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Algorithm Selection with Inline Assembly(part2)</title>
      <dc:creator>A Serputov</dc:creator>
      <pubDate>Mon, 21 Mar 2022 21:28:41 +0000</pubDate>
      <link>https://dev.to/serputov/algorithm-selection-with-inline-assemblypart2-4ncc</link>
      <guid>https://dev.to/serputov/algorithm-selection-with-inline-assemblypart2-4ncc</guid>
      <description>&lt;p&gt;This is the second part of Algorithm Selection with Inline Assembly. We are going to change our code to use SVE2 instructions. &lt;/p&gt;

&lt;p&gt;Quick Note: &lt;code&gt;The Armv9 Scalable Vector Extensions version 2 (SVE2) provide a variable-width SIMD capability for AArch64 systems.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We will work with the AArch64(Israel server) machine for those who don't remember.&lt;/p&gt;

&lt;p&gt;The purpose of this lab is to: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new version of the volume scaling code from the Algorithm Selection Lab, which uses SVE2 instructions. &lt;/li&gt;
&lt;li&gt;Next, we will prove that the code is using SVE2 instructions by analyzing the disassembly of the relevant portion of the binary.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's &lt;a href="https://wiki.cdot.senecacollege.ca/wiki/SVE2"&gt;start&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;I started by changing the Makefile to compile our files with different commands to use :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcc -march=armv8-a+sve2 ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember that in order to invoke the autovectorizer in GCC version 11, you must use -O3:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcc -O3 -march=armv8-a+sve2 ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next step is to add SVE instructions into our C code and check how long it will take to execute with new features.&lt;/p&gt;

&lt;p&gt;Here is our current code for &lt;code&gt;Vol4&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include "vol.h"
#include &amp;lt;arm_sve.h&amp;gt;

int main() {

#ifndef __aarch64__
    printf("Wrong architecture - written for aarch64 only.\n");
#else


    // these variables will also be accessed by our assembler code
    int16_t*    in_cursor;       // input cursor
    int16_t*    out_cursor;       // output cursor
    int16_t     vol_int;        // volume as int16_t

    int16_t*    limit;         // end of input array

    int       x;           // array interator
    int       ttl=0 ;         // array total

// ---- Create in[] and out[] arrays
    int16_t*    in;
    int16_t*    out;
    in=(int16_t*) calloc(SAMPLES, sizeof(int16_t));
    out=(int16_t*) calloc(SAMPLES, sizeof(int16_t));

// ---- Create dummy samples in in[]
    vol_createsample(in, SAMPLES);

// ---- This is the part we're interested in!
// ---- Scale the samples from in[], placing results in out[]


    // set vol_int to fixed-point representation of the volume factor
    // Q: should we use 32767 or 32768 in next line? why?
    vol_int = (int16_t)(VOLUME/100.0 * 32767.0);

    // Q: what is the purpose of these next two lines?
    in_cursor = in;
    out_cursor = out;
    limit = in + SAMPLES;

    // Q: what does it mean to "duplicate" values in the next line?
    __asm__ ("dup w1.8h,%w0"::"r"(vol_int)); // duplicate vol_int into v1.8h

    while ( in_cursor &amp;lt; limit ) {
        __asm__ (
            "ldr q0, [%[in_cursor]], #16  \n\t"
            // load eight samples into q0 (same as v0.8h)
            // from [in_cursor]
            // post-increment in_cursor by 16 bytes
            // ans store back into the pointer register

            "sqrdmulh v0.8h, v0.8h, v1.8h  \n\t"
            // with 32 signed integer output,
            // multiply each lane in v0 * v1 * 2
            // saturate results
            // store upper 16 bits of results into
            // the corresponding lane in v0

            "str q0, [%[out_cursor]],#16      \n\t"
            // store eight samples to [out_cursor]
            // post-increment out_cursor by 16 bytes
            // and store back into the pointer register

            // Q: What do these next three lines do?
            : [in_cursor]"+r"(in_cursor), [out_cursor]"+r"(out_cursor)
            : "r"(in_cursor),"r"(out_cursor)
            : "memory"
            );
    }

// --------------------------------------------------------------------

    for (x = 0; x &amp;lt; SAMPLES; x++) {
        ttl=(ttl+out[x])%1000;
    }

    // Q: are the results usable? are they correct?
    printf("Result: %d\n", ttl);

    return 0;

#endif
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: We are checking our code on 5M Samples.&lt;/p&gt;

&lt;p&gt;How to add SVE2 instructions?&lt;/p&gt;

&lt;p&gt;We need to know more about SVE2. From the lab instructions, we have these links to ARM developers docs:&lt;br&gt;
Arm Armv9-A A64 Instruction Set Architecture - &lt;a href="https://developer.arm.com/documentation/ddi0602/2021-12/"&gt;https://developer.arm.com/documentation/ddi0602/2021-12/&lt;/a&gt;&lt;br&gt;
Introduction to SVE2 - &lt;a href="https://developer.arm.com/documentation/102340/0001/?lang=en"&gt;https://developer.arm.com/documentation/102340/0001/?lang=en&lt;/a&gt;&lt;br&gt;
Intrinsics - Arm C Language Extensions for SVE (ACLE) - &lt;a href="https://developer.arm.com/documentation/100987/latest"&gt;https://developer.arm.com/documentation/100987/latest&lt;/a&gt;&lt;br&gt;
SVE Coding Considerations with Arm Compiler - Note that this documentation is specific to Arm's compiler, but most of it will apply to other compilers, including gcc - &lt;a href="https://developer.arm.com/documentation/100748/0616/SVE-Coding-Considerations-with-Arm-Compiler"&gt;https://developer.arm.com/documentation/100748/0616/SVE-Coding-Considerations-with-Arm-Compiler&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After reading, I started implementing the instructions for SVE2.&lt;br&gt;
I decide to work with vol4. &lt;/p&gt;

&lt;p&gt;Let's include header &lt;code&gt;#include &amp;lt;arm_sve.h&amp;gt;&lt;/code&gt;&lt;br&gt;
Our &lt;code&gt;Makefile&lt;/code&gt; has already new instructions, for vol4 &lt;br&gt;
I have&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; gcc -O3 -march=armv8-a+sve2 ${CCOPTS} vol4.c vol_createsample.o -o vol4
And for all other I decided to experiment:
gcc ${CCOPTS} vol1/2/3/5.c -march=armv8-a+sve2 vol_createsample.o -Ofast -o vol1/2/3/5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5L4V-lGE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j6luylwueouimwvq5guc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5L4V-lGE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j6luylwueouimwvq5guc.png" alt="Image description" width="880" height="662"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, I've decided to change the number of samples. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y59g8ctw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fiziwqrvgi4mdoozyyq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y59g8ctw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fiziwqrvgi4mdoozyyq7.png" alt="Image description" width="880" height="191"&gt;&lt;/a&gt;&lt;br&gt;
To run all the vol with SVE2 instruction, we need to run it with this command &lt;code&gt;qemu-aarch64&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PCs8Y_co--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4izbfc6kjvz8a0qkx8dk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PCs8Y_co--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4izbfc6kjvz8a0qkx8dk.png" alt="Image description" width="880" height="94"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, I updated the register as said in SVE instructions.&lt;/p&gt;

&lt;p&gt;I had one error while working on this lab, but I found out it was because of number of samples.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;⚠️ Computer Architecture Blog Post: Link&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://github.com/aserputov"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;🖇 Follow me on &lt;a href="https://twitter.com/aserputov"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_p.s This post was made for my Software Portability and Optimization class. Lab 6.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
