Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,36 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

include(FetchContent)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

# set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS "-w")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")

include_directories(${Matrix_SOURCE_DIR}/include)
include_directories(${Matrix_SOURCE_DIR}/lib/benchmark/include)
link_directories(${Matrix_SOURCE_DIR}/lib/benchmark/build/src)
# Externally provided libraries
set(BENCHMARK_ENABLE_TESTING NO)

FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG origin/master)

include_directories(${Matrix_SOURCE_DIR}/lib/googletest/googletest/include)
link_directories(${Matrix_SOURCE_DIR}/lib/googletest/googletest/build/src)
FetchContent_Declare(
googlebenchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG origin/master
)

FetchContent_MakeAvailable(
googletest
googlebenchmark
)

include_directories(${Matrix_SOURCE_DIR}/include)

add_custom_target(examples)
add_subdirectory(examples)
Expand Down
49 changes: 25 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,31 @@

3. [Benchmarking](#benchmarking)

4. [Quick Start Guide](#quick-start-guide)
4. [Testing](#testing)

4.1. [Initializers](#initializers)
5. [Quick Start Guide](#quick-start-guide)

4.2. [Slicing](#slicing)
5.1. [Initializers](#initializers)

4.3. [Printing/Viewing](#printingviewing)
5.2. [Slicing](#slicing)

4.4. [Indexing](#indexing)
5.3. [Printing/Viewing](#printingviewing)

4.5. [Operators](#operators)
5.4. [Indexing](#indexing)

4.6. [Broadcasting](#broadcasting)
5.5. [Operators](#operators)

4.7. [Minimum, Maximum](#minimum-maximum)
5.6. [Broadcasting](#broadcasting)

4.8. [Mathematical Operations](#mathematical-operations)
5.7. [Minimum, Maximum](#minimum-maximum)

4.9. [Statistical Operations](#statistical-operations)
5.8. [Mathematical Operations](#mathematical-operations)

4.10. [Matrix Algebra](#matrix-algebra)
5.9. [Statistical Operations](#statistical-operations)

4.11. [Miscellaneous](#miscellaneous)
5.10. [Matrix Algebra](#matrix-algebra)

5.11. [Miscellaneous](#miscellaneous)

## Installation

Expand All @@ -45,9 +47,6 @@ need git and cmake installed.
# Check out the library.
$ git clone https://github.com/mlcpp/Matrix.git && cd Matrix

# Pull git submodules
$ git submodule update --init

# Make a build directory to place the build output.
$ cmake -E make_directory "build"

Expand Down Expand Up @@ -86,9 +85,6 @@ On a unix system, the build directory should now look something like this:
# Check out the library.
$ git clone https://github.com/mlcpp/Matrix.git && cd Matrix

# Pull git submodules
$ git submodule update --init

# Create build directory.
$ mkdir build

Expand Down Expand Up @@ -123,9 +119,6 @@ Add these tools to PATH.
# Check out the library.
$ git clone https://github.com/mlcpp/Matrix.git && cd Matrix

# Pull git submodules
$ git submodule update --init

# Create build directory.
$ mkdir build

Expand All @@ -144,11 +137,19 @@ $ mingw-make <file_name_without_extension> # use mingw32-make if usin

## Benchmarking

To compile benchmarking binaries:
To compile g_benchmark binaries:

Linux: `make benchmarks`

Windows: `mingw32-make benchmarks`

## Testing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add testing in Table of Contents also.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok


To compile g_test binaries:

Linux:
Linux: `make tests`

`g++ <file_name>.cpp -std=c++11 -I../include/ -isystem ../lib/benchmark/include -L../lib/benchmark/build/src -lbenchmark -lpthread -o ./linux_binaries/<file_name>`
Windows: `mingw32-make tests`

## Quick Start Guide

Expand Down
1 change: 0 additions & 1 deletion lib/benchmark
Submodule benchmark deleted from a6d08a
1 change: 0 additions & 1 deletion lib/googletest
Submodule googletest deleted from 703bd9