No ACL setup yet! Denying access to everyone.
en:edu:zmitac:s1:apl:lab:lab4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:edu:zmitac:s1:apl:lab:lab4 [2024/12/05 12:24] – ktokarzen:edu:zmitac:s1:apl:lab:lab4 [2024/12/05 12:39] (current) – [Tasks to be done during laboratory] ktokarz
Line 25: Line 25:
     dllHandle = LoadLibrary(TEXT("JaAsm.dll"));     dllHandle = LoadLibrary(TEXT("JaAsm.dll"));
     MyProc Sum_of_vectors = (MyProc)GetProcAddress(dllHandle, "Sum_of_vectors");     MyProc Sum_of_vectors = (MyProc)GetProcAddress(dllHandle, "Sum_of_vectors");
 +    
 +    Sum_of_vectors();
 } }
 </code> </code>
Line 109: Line 111:
 .code .code
  
-;****************************************************************************  +;**************************************************************************** 
-;   This function +;   Function to calculate the sum of two vectors 
 +;   Accepts two parameters, returns result by third parameter
 ;****************************************************************************  ;**************************************************************************** 
 Sum_of_vectors PROC  Sum_of_vectors PROC 
Line 129: Line 132:
  
 ===== Tasks to be done during laboratory ===== ===== Tasks to be done during laboratory =====
-  - Compile the examples and observe their behaviour. Set the breakpoint at the beginning of the code and see how the contents of the registers change with every loop pass. Observe XMM registers as calculations are performed there. +  - Compile the examples and observe their behaviour. Set the breakpoint at the beginning of the code and see how the contents of the registers change. Observe XMM registers as calculations are performed there. 
-  - Write additional functions which calculate subtraction, multiplication and division of arguments.+  - Write additional functions to calculate subtraction, multiplication, and division of arguments. 
 +  - Write the program which calculates the average of the values in the table using vector (SIMD) instructions. Program assumptions: 
 +  * Table contains 64 float values and is defined in C++ file. 
 +  * And address of the table is passed to the function as the first argument. 
 +  * A size of the table is passed as a second argument (you can assume that the size of the table is a multiply of 4). 
 +  * Function uses SIMD instructions. 
 +  * Function returns the value as the scalar, traditionally by XMM0. 
 + 
 +=====For the report===== 
 +  - Include the code of additional functions. 
 +  - Include the code of the average program (both C++ and asm files). 
 +  - The above programs must contain comments.
en/edu/zmitac/s1/apl/lab/lab4.1733397896.txt.gz · Last modified: by ktokarz