Skip to content

The Assembly and C Exercise aims to practice assembly language programming using SSE/AVX instructions and C SSE/AVX intrinsics.

Notifications You must be signed in to change notification settings

TalMizrahii/Parallel-SIMD-and-Intrinsics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation


pStringMem
Assembly SIMD and C Intrisics

DescriptionPart I - StringsPart II - FormulasDependenciesInstalling And ExecutingAuthor

Description

About The Exercise

download

The Assembly and C Exercise aims to practice assembly language programming using SSE/AVX instructions and C SSE/AVX intrinsics. It consists of two unrelated parts: string processing and floating-point calculations. Each part comprises various tasks and utilizes different source files for its environment.

download

Part I - Strings

In this part, two string operators are implemented using SSE/AVX instructions and intrinsics.

Hamming Distance

download

The Hamming distance between two strings is calculated as the number of positions at which the corresponding symbols are different. The implementation is done in assembly language only, specifically in the file named hamming.s.

Base 64 Distance

images

The Base64 distance between two strings involves:

  1. Removing non-base 64 characters while maintaining the order of every other character.
  2. Calculating the numbers represented by the strings and subtracting the first from the second. The implementation is in C using intrinsics, in the file named b64.c.

Part II - Formulas

This part involves mathematical formulas applied to arrays of floating-point numbers.

The First Formula

Formula 1 calculates the expression:

2

The implementation is in C using intrinsics, in the file named formula1.c.

The Second Formula

Formula 2 computes the expression:

1

The implementation is in assembly language, specifically in the file named formula2.s.

Dependencies

This exercise has the following dependencies:

  • SSE/AVX Support: Ensure that the target platform supports SSE/AVX instructions for optimal performance.
  • Compiler and Assembler: A compatible C compiler and assembler are required to compile and assemble the provided source files.

Installing And Executing

To install and run the program you use Git. From your command line:

# Clone this repository.
$ git clone https://github.com/TalMizrahii/Parallel-SIMD-and-Intrinsics

# Navigate to the repository directory:
$ cd Parallel-SIMD-and-Intrinsics

To run strings:

# Enter strings:
$ cd strings

# Compile the program:
$ make

# Run the program:
$ make run

To run formulas:

# Enter formulas:
$ cd formulas

# Compile the program:
$ make

# Run the program:
$ make run

Authors

About

The Assembly and C Exercise aims to practice assembly language programming using SSE/AVX instructions and C SSE/AVX intrinsics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published