Skip to content

Commit

Permalink
Minor optimization (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjessesco authored Dec 31, 2024
1 parent 3c4851f commit e071211
Show file tree
Hide file tree
Showing 32 changed files with 110 additions and 109 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ env:
jobs:
deploy:

runs-on: macos-12
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Install Doxygen
run: brew install doxygen
run: brew install doxygen pipx

- name: Install pip3 packages
run: pip3 install Sphinx sphinx-rtd-theme breathe sphinx-mdinclude
run: pip3 install Sphinx sphinx-rtd-theme breathe sphinx-mdinclude --break-system-packages

- name: Configure CMake with DOCS
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DDOCS=ON
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest_macos_appleclang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
build:
runs-on: macos-12
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unittest_macos_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
build:
runs-on: macos-12
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
Expand All @@ -21,7 +21,7 @@ jobs:
run: brew install llvm

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTEST=ON
run: cmake -B ${{github.workspace}}/build -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTEST=ON

- name: Build
# Build your program with the given configuration
Expand Down
62 changes: 32 additions & 30 deletions .github/workflows/unittest_ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
name: Unit Test (Ubuntu)

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
# Run unittest on debug config only
BUILD_TYPE: Debug

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTEST=ON

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build/test
run: ./PeanutTest

# TODO
#
#name: Unit Test (Ubuntu)
#
#on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
#
#env:
# # Run unittest on debug config only
# BUILD_TYPE: Debug
#
#jobs:
# build:
# runs-on: ubuntu-22.04
#
# steps:
# - uses: actions/checkout@v3
#
# - name: Configure CMake
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DTEST=ON
#
# - name: Build
# # Build your program with the given configuration
# run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
#
# - name: Test
# working-directory: ${{github.workspace}}/build/test
# run: ./PeanutTest
#
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
build/
cmake-build-debug/
cmake-build-release/
cmake-build-relwithdebinfo/
armadillo-code/
eigen/
.vs/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Jino Park
Copyright (c) 2022-2024 Jino Park

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Unit Test (macOS, AppleClang)](https://github.com/pjessesco/peanut/actions/workflows/unittest_macos_appleclang.yml/badge.svg?branch=main)](https://github.com/pjessesco/peanut/actions/workflows/unittest_macos_appleclang.yml)
[![Unit Test (macOS, Clang)](https://github.com/pjessesco/peanut/actions/workflows/unittest_macos_clang.yml/badge.svg?branch=main)](https://github.com/pjessesco/peanut/actions/workflows/unittest_macos_clang.yml)
[![Unit Test (Ubuntu)](https://github.com/pjessesco/peanut/actions/workflows/unittest_ubuntu.yml/badge.svg?branch=main)](https://github.com/pjessesco/peanut/actions/workflows/unittest_ubuntu.yml)
[![Unit Test (Windows MSVC)](https://github.com/pjessesco/peanut/actions/workflows/unittest_windows_msvc.yml/badge.svg?branch=main)](https://github.com/pjessesco/peanut/actions/workflows/unittest_windows_msvc.yml)
[![Unit Test (Windows Clang)](https://github.com/pjessesco/peanut/actions/workflows/unittest_windows_clang.yml/badge.svg?branch=main)](https://github.com/pjessesco/peanut/actions/workflows/unittest_windows_clang.yml)
[![Deploy doxygen documents](https://github.com/pjessesco/peanut/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/pjessesco/peanut/actions/workflows/docs.yml)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# -- Project information -----------------------------------------------------

project = 'Peanut'
copyright = '2022, Jino Park'
copyright = '2022-2024, Jino Park'
author = 'Jino Park'


Expand Down
2 changes: 1 addition & 1 deletion include/Peanut/Peanut.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This software is released under the MIT license.
//
// Copyright (c) 2022 Jino Park
// Copyright (c) 2022-2024 Jino Park
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion include/Peanut/impl/binary_expr/matrix_div_scalar.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This software is released under the MIT license.
//
// Copyright (c) 2022 Jino Park
// Copyright (c) 2022-2024 Jino Park
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion include/Peanut/impl/binary_expr/matrix_emult.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This software is released under the MIT license.
//
// Copyright (c) 2022 Jino Park
// Copyright (c) 2022-2024 Jino Park
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion include/Peanut/impl/binary_expr/matrix_mult.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This software is released under the MIT license.
//
// Copyright (c) 2022 Jino Park
// Copyright (c) 2022-2024 Jino Park
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion include/Peanut/impl/binary_expr/matrix_mult_scalar.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This software is released under the MIT license.
//
// Copyright (c) 2022 Jino Park
// Copyright (c) 2022-2024 Jino Park
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion include/Peanut/impl/binary_expr/matrix_subtract.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This software is released under the MIT license.
//
// Copyright (c) 2022 Jino Park
// Copyright (c) 2022-2024 Jino Park
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion include/Peanut/impl/binary_expr/matrix_sum.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This software is released under the MIT license.
//
// Copyright (c) 2022 Jino Park
// Copyright (c) 2022-2024 Jino Park
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 5 additions & 1 deletion include/Peanut/impl/common.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This software is released under the MIT license.
//
// Copyright (c) 2022 Jino Park
// Copyright (c) 2022-2024 Jino Park
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -34,7 +34,11 @@

// Dependencies headers

#if defined(_MSC_VER) && !defined(__llvm__) && !defined(__INTEL_COMPILER)
#define INLINE __forceinline
#else
#define INLINE __attribute__((always_inline)) inline
#endif

namespace Peanut {
using Index = unsigned int;
Expand Down
Loading

0 comments on commit e071211

Please sign in to comment.