Posts

Project Plan - 2

INTRODUCTION  Hello, this blog is about the first version of the device that I am trying to make it. which is going to copy the function 3 times in different manner in file using auto-vectorization.The function that is given as the argument is created in three different ways by this device. When creating the main output file from these routines, this device leverages the ifunc capability to select the optimum approach. PROCEDURE  The second argument, function.c, is initially read before anything else. But before that, I used the Sys library to retrieve an array of parameters. By doing this, I was able to get the filename for both the first and second inputs. I was able to store the names of both files in two variables as a result. I then used the fopen() technique to read the function.c file. I then used std::string::find and std::string::replace to alter the function's name. After reviewing the function, I changed the function name and printed the f function three times. For Advan

GCC (GNU Compiler Collection)

 GCC What is GCC? In simple words we can say a  collection of compilers and development tools for Linux, Windows, multiple BSDs, and a plethora of other operating systems is offered by the GNU Compiler Collection, or GCC. Along with support for Objective-C, Ada, Go, Fortran, and D, it primarily supports C and C++. GCC was created by the Free Software Foundation (FSF) and made available as totally free (as in libre) software. How does it work? The GCC toolchain assembles the executable once the code has been compiled, linked with the required libraries, and translated into an assembler. It adheres to the traditional UNIX design principle of using simple tools that perform specific tasks effectively. These proprietary tools are used to compile software using the GCC development suite. GCC uses a preprocessor to add header files and remove comments before executing source code files. The code is then tokenized, macros expanded, compile-time errors detected, and ready to compile. They are

ifunc function

IFUNC What is IFUNC? With the aid of a resolver function that was also written by the developer, numerous implementations of a particular function can be created using the GNU indirect function support (IFUNC) feature of the GNU toolchain. During early startup, the dynamic loader calls the resolver function to determine which implementation the application will use. Once a decision on implementation is made, it cannot be modified for the duration of the procedure. How to use it? As you can see, there are already a few limitations on how IFUNC can be used.                                                             It is t he implementations and the resolver must both be defined in the same translation unit. functions that cannot be weakly specified.    Since the resolution of an IFUNC might occur very early in the dynamic loader startup process, especially if -Wl,z,now is used to generate the application, the limitations are actually stricter than this (requires all symbols be resolved

Project Part - 1

 The Goal of this project is as follow: " The goal for this project is to produce a proof-of-concept tool that will take code that meets specific conditions and automatically build it with ifunc capability to select between multiple, autovectorized versions of a function, to take advantage of the best SIMD implementation available on the CPU on which the code is running. " (Chris Tyler) Project Part 1 To work with the main function and function  file   I  am going to used C or C++  language as the base language. And Visual Studio Code as IDE for writing and impelling the test that is provide by our professor as follow :  https://github.com/ctyler/spo600-fall2022-project-test-code Overall Project Working : 1) Get Input from Keyboard when run. 2) Running the parameters successfully. 3) The solution of the file should be capable of changing parameters of file inside it. 4) No bugs should be there and the file can change at any moment. SOLUTION : I plan to add ifunc function in C

Lab5 Part 2 Algorithm 2

 According to the loudness factor, another algorithm simply shifted everything by an order of magnitude to the right. I haven't had time to talk about the outcomes of this algorithm with the group or with individuals, so I'm at a loss for words. I'd say it's definitely off if I had to guess which would be the best option. Multiplication takes longer than bit shifting, which is one of the reasons I say this. Why then is it so slow? This is so that the CPU doesn't merely shuffle bits around in memory but also compute values. The term implies that this is a bit shift. I would anticipate that bit shifting would also be favourable in terms of memory utilisation. Other techniques call for the lookup table to be stored and accessed somewhere in memory. Even though we're only working with 16-bit numbers, the largest possible values are 65, 536, etc., and the majority of contemporary PCs can hold 64k bits in registers, making them simple to store in registers. Without ac

Lab5 Part 1 Algorithm 1

 We spoke about how to analyse sound and programmatically scale sound input before we started the lab. The process of sound analysis is not particularly unique. Integer and floating point (decimal) numbers used to represent sound input are parsed to perform analysis. Additionally, changing the level simply involves performing an arithmetic operation on each integer contained in the sound sample. And that was the lab's main objective. The objective was not without risk, though. The easiest or most naive way was to perform the procedure by looping through all the numbers. This was a lengthy and ineffective method, though, when done on a mobile device. Because the CPU executes this repeating operation each time the user changes the volume, this drains the battery. Our task was to come up with a more effective technique to accomplish this. We have sound samples in the lab that are exclusively represented by random numbers between -65,536 and 65,536, or the range. Why those strange digi

Lab 4 - Part 1 AArch64

 This lab we are going to run simple run on loop to print some lines in the like loop0 loop1 and till 9 or 30. So the base code is given by Chris Tyler and we need to modified that code or basically clly we just need to add some code in it.  So here is the code for the loop which will go 30 times in the printing statement which is like this: x .text .globl _start min = 0 /* starting value for the loop index; note that this is a symbol (constant), not a variable */ max = 31 /* loop exits when the index hits this number (loop condition is i<max) */ ten = 10 _start: mov x19, min mov x22, ten loop: adr x1, msg mov x2, len mov x0, 1 mov x8, 64 svc 0 adr x23, msg add x19, x19, 1 udiv x20, x19, x22 msub x21, x22, x20, x19 cmp x20, 0 beq skip add x20, x20, '0' strb w20, [x23,6] skip: add