Posts

Showing posts from March, 2022

SPO600 Lab 6

#include <stdio.h> #include <stdbool.h> #include <arm_sve.h> #include "vol.h" int main () {     int x ;     int ttl = 0 ;     // ---- Create in[] and out[] arrays     int64_t * in ;     int64_t * out ;     in = ( int64_t * ) calloc ( SAMPLES , sizeof ( int64_t ));     out = ( int64_t * ) calloc ( SAMPLES , sizeof ( int64_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[]     /*for (x = 0; x < SAMPLES; x++) {         out[x]=(int64_t) ((float) (VOLUME/100.0) * (float) in[x]);     }*/     svbool_t pg ; // [1]     svint64_t svin ; // [1]     svfloat64_t svv ; // [1]     const float64_t division = ( float )( VOLUME / 100.0 ); // [2]     for ( int i = 0 ; i < SAMPLES ; i += svcntd ()) // [3]     {         pg = svwhilelt_b64 ( i , SAMPLES ); // [4]         svin = svld1 ( p

SPO600 Lab 5

  In lab 5, I handed on an experiment where I benchmarked c programs that simulate the process of scaling volumes using different algorithms. The programs are separated, and this would cause inconsistent results because, for each run time, programs would create different random data of samples. Thus, I combine them into one to have a more reliable result for using mutual samples. Furthermore, I also set the number of samples to 300000, and the number of benchmark tests is 10000. For each test, I store the timer for each algorithm. In the end, I print the average time each algorithm takes. Here is my repository on GitHub: https://github.com/willvuong168/SPO600-Lab-5 Taking the advantage of a C++ course that I am taking, where I already had a timer program. All I have to do is put the timer before and after each scaling function. Before making an all-in-one program, each algorithm sums the sample's output and prints it out to the screen because each algorithm may produce a differ

SPO600 Project Stage 1

For the final project in the SPO600 course, I have to find an open-source project to implement it with the new ARM SVE2 instructions. Regarding open source projects, the first place that appears in my mind is GitHub, so I decided to look for one on GitHub. In Lab 6, I have implemented a C program from Lab 5 using SVE2 instructions, and this affects my decision to find similar open-source projects on GitHub. As recommended, I should look for an open-source project that is at library level and do processing on large data sets. To start with researching for a project, I went to the trending tab on GitHub, and it showed a huge list (100 pages) of C repositories. I filtered out the list by sorting it by its popularity, and I thought I should choose a project that does not have too many stars because if I choose a project that has many stars, there is less work to do with it because there are already many people have involved in the project. Thus, I went to the last pages of the list to fi