Skip to content

Commit cd19acc

Browse files
committed
Added Eigen, hwy update, omp parallelization
1 parent bcc5869 commit cd19acc

File tree

484 files changed

+184924
-5095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

484 files changed

+184924
-5095
lines changed

app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ android {
4545

4646
dependencies {
4747
implementation project(":avif-coder")
48-
implementation project(":avif-coder-coil")
4948
implementation 'androidx.core:core-ktx:1.10.1'
5049
implementation 'androidx.appcompat:appcompat:1.6.1'
5150
implementation 'com.google.android.material:material:1.9.0'

avif-coder/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ afterEvaluate {
4242
create<MavenPublication>("mavenJava") {
4343
groupId = "com.github.awxkee"
4444
artifactId = "avif-coder"
45-
version = "1.5.12"
45+
version = "1.6.0"
4646
from(components["release"])
4747
// artifact("androidSourcesJar")
4848
}
@@ -69,7 +69,9 @@ android {
6969
ndkVersion = "26.1.10909125"
7070
cppFlags.addAll(
7171
listOf(
72-
"-std=c++20"
72+
"-std=c++20",
73+
"-fopenmp",
74+
"-static-openmp"
7375
)
7476
)
7577
abiFilters += setOf("armeabi-v7a", "arm64-v8a", "x86_64", "x86")

avif-coder/src/main/cpp/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ add_library(coder SHARED coder.cpp JniException.cpp SizeScaler.cpp
2121
imagebits/Rgb565.cpp JniBitmap.cpp ReformatBitmap.cpp Support.cpp IccRecognizer.cpp
2222
HardwareBuffersCompat.cpp VulkanRunner.cpp imagebits/half.cpp
2323
imagebits/half.hpp imagebits/RgbaU16toHF.cpp
24-
imagebits/RGBAlpha.cpp colorspace/CoderCms.cpp)
24+
imagebits/RGBAlpha.cpp colorspace/CoderCms.cpp
25+
hwy/aligned_allocator.cc hwy/nanobenchmark.cc hwy/per_target.cc hwy/print.cc hwy/targets.cc
26+
hwy/timer.cc)
2527

2628
add_library(libaom STATIC IMPORTED)
2729
add_library(libx265 STATIC IMPORTED)
2830
add_library(libheif STATIC IMPORTED)
2931
add_library(libyuv STATIC IMPORTED)
3032
add_library(libde265 STATIC IMPORTED)
3133
add_library(libdav1d STATIC IMPORTED)
32-
add_library(libhwy STATIC IMPORTED)
3334
add_library(libsharpyuv STATIC IMPORTED)
3435

3536
set_target_properties(libaom PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/${ANDROID_ABI}/libaom.a)
@@ -38,7 +39,6 @@ set_target_properties(libheif PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/l
3839
set_target_properties(libyuv PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/${ANDROID_ABI}/libyuv.a)
3940
set_target_properties(libde265 PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/${ANDROID_ABI}/libde265.a)
4041
set_target_properties(libdav1d PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/${ANDROID_ABI}/libdav1d.a)
41-
set_target_properties(libhwy PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/${ANDROID_ABI}/libhwy.a)
4242
set_target_properties(libsharpyuv PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/lib/${ANDROID_ABI}/libsharpyuv.a)
4343

4444
add_library(cpufeatures STATIC ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
@@ -80,8 +80,6 @@ include_directories(icc)
8080

8181
target_link_libraries( # Specifies the target library.
8282
coder
83-
84-
# Links the target library to the log library
85-
# included in the NDK.
83+
-static-openmp
8684
${log-lib} libaom libx265 libheif cpufeatures libyuv -ljnigraphics
87-
libde265 libdav1d libhwy libsharpyuv ${android-lib})
85+
libde265 libdav1d libsharpyuv ${android-lib})
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// This file is part of Eigen, a lightweight C++ template library
2+
// for linear algebra.
3+
//
4+
// This Source Code Form is subject to the terms of the Mozilla
5+
// Public License v. 2.0. If a copy of the MPL was not distributed
6+
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
8+
#ifndef EIGEN_CHOLESKY_MODULE_H
9+
#define EIGEN_CHOLESKY_MODULE_H
10+
11+
#include "Core"
12+
#include "Jacobi"
13+
14+
#include "src/Core/util/DisableStupidWarnings.h"
15+
16+
/** \defgroup Cholesky_Module Cholesky module
17+
*
18+
*
19+
*
20+
* This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
21+
* Those decompositions are also accessible via the following methods:
22+
* - MatrixBase::llt()
23+
* - MatrixBase::ldlt()
24+
* - SelfAdjointView::llt()
25+
* - SelfAdjointView::ldlt()
26+
*
27+
* \code
28+
* #include <Eigen/Cholesky>
29+
* \endcode
30+
*/
31+
32+
#include "src/Cholesky/LLT.h"
33+
#include "src/Cholesky/LDLT.h"
34+
#ifdef EIGEN_USE_LAPACKE
35+
#ifdef EIGEN_USE_MKL
36+
#include "mkl_lapacke.h"
37+
#else
38+
#include "src/misc/lapacke.h"
39+
#endif
40+
#include "src/Cholesky/LLT_LAPACKE.h"
41+
#endif
42+
43+
#include "src/Core/util/ReenableStupidWarnings.h"
44+
45+
#endif // EIGEN_CHOLESKY_MODULE_H
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// This file is part of Eigen, a lightweight C++ template library
2+
// for linear algebra.
3+
//
4+
// This Source Code Form is subject to the terms of the Mozilla
5+
// Public License v. 2.0. If a copy of the MPL was not distributed
6+
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
8+
#ifndef EIGEN_CHOLMODSUPPORT_MODULE_H
9+
#define EIGEN_CHOLMODSUPPORT_MODULE_H
10+
11+
#include "SparseCore"
12+
13+
#include "src/Core/util/DisableStupidWarnings.h"
14+
15+
extern "C" {
16+
#include <cholmod.h>
17+
}
18+
19+
/** \ingroup Support_modules
20+
* \defgroup CholmodSupport_Module CholmodSupport module
21+
*
22+
* This module provides an interface to the Cholmod library which is part of the <a href="http://www.suitesparse.com">suitesparse</a> package.
23+
* It provides the two following main factorization classes:
24+
* - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
25+
* - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
26+
*
27+
* For the sake of completeness, this module also propose the two following classes:
28+
* - class CholmodSimplicialLLT
29+
* - class CholmodSimplicialLDLT
30+
* Note that these classes does not bring any particular advantage compared to the built-in
31+
* SimplicialLLT and SimplicialLDLT factorization classes.
32+
*
33+
* \code
34+
* #include <Eigen/CholmodSupport>
35+
* \endcode
36+
*
37+
* In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies.
38+
* The dependencies depend on how cholmod has been compiled.
39+
* For a cmake based project, you can use our FindCholmod.cmake module to help you in this task.
40+
*
41+
*/
42+
43+
#include "src/CholmodSupport/CholmodSupport.h"
44+
45+
#include "src/Core/util/ReenableStupidWarnings.h"
46+
47+
#endif // EIGEN_CHOLMODSUPPORT_MODULE_H
48+

0 commit comments

Comments
 (0)