项目作者: Kautenja

项目描述 :
A parallel, recursive, and cache-oblivious Matrix initialization and transposition method
高级语言: Jupyter Notebook
项目地址: git://github.com/Kautenja/fast-cpu-transpose.git
创建时间: 2017-11-07T16:41:23Z
项目社区:https://github.com/Kautenja/fast-cpu-transpose

开源协议:MIT License

下载


Fast CPU Transpose

Build Status

Completed for Lab 3 of COMP7300, Advanced Computer Architecture, at Auburn University.

Usage

Compilation

The code uses threads with -pthread flag. The usage of the -Ofast flag
enables all compile-time optimizations.

  1. cc -Ofast -pthread <code_file> -o <output_executable>
Example
  1. cc -Ofast -pthread rowwise.c -o rowwise

Test Automation

The 5 test runs are automated with a shell script. Make sure the permissions
are set correctly first by executing the following from the top level of the
project:

  1. chmod 0755 ./run.sh

A test can be executed using the following command from the top level:

  1. ./run.sh <code file name>

This will route the shell output to a file in the build directory
called <code file name>.out. Note that the .c IS NOT included in this
command.

Example

To run the default provided code (adjusted for 7 tests):

  1. ./run.sh myInitializeMatrix

rowwise.c

contains the code for row-wise initialization and transpose. To compile and run
the row-wise initialization (and optimized transposition):

  1. mkdir -p build
  2. cc -Ofast -pthread rowwise.c -o build/rowwise
  3. ./build/rowwise

To compile and run the 5 consecutive tests saving the output to a file:

  1. ./run.sh rowwise

columnwise.c

contains the code for column-wsie intialization and transpose. To compile and
run the column-wise initialization (and optimized transposition):

  1. mkdir -p build
  2. cc -Ofast -pthread columnwise.c -o build/columnwise
  3. ./build/columnwise

To compile and run the 5 consecutive tests saving the output to a file:

  1. ./run.sh columnwise