Skip to content

Commit

Permalink
Update copyright info
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentjzy committed Apr 12, 2024
1 parent 412f52f commit c81269c
Show file tree
Hide file tree
Showing 47 changed files with 491 additions and 448 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Users may refer to our papers for more information about the detailed principles
9. L. Cai, J. Yang, S. Dong, Z. Jiang. GPU accelerated parallel reliability-guided digital volume correlation with automatic seed selection based on 3D SIFT. Parallel Computing (2021) 108: 102824. (https://doi.org/10.1016/j.parco.2021.102824)
10. A. Lin, R. Li, Z. Jiang, S. Dong, Y. Liu, Z. Liu, L. Zhou, L. Tang, Path independent stereo digital image correlation with high speed and analysis resolution, Optics and Lasers in Engineering (2022) 149: 106812. (https://doi.org/10.1016/j.optlaseng.2021.106812)
11. Z. Jiang, OpenCorr: An open source library for research and development of digital image correlation. Optics and Lasers in Engineering (2023) 165: 107566. (https://doi.org/10.1016/j.optlaseng.2023.107566)
12. Yin W, Ji Y, Chen J, Li R, Feng S, Chen Q, Pan B, Jiang Z, Zuo C. Initializing and accelerating Stereo-DIC computation using semi-global matching with geometric constraints. Optics and Lasers in Engineering (2024) 172: 107879. (https://doi.org/10.1016/j.optlaseng.2023.107879)
12. W. Yin, Y. Ji, J. Chen, R. Li, S. Feng, Q. Chen, B. Pan, Z. Jiang, C. Zuo, Initializing and accelerating Stereo-DIC computation using semi-global matching with geometric constraints. Optics and Lasers in Engineering (2024) 172: 107879. (https://doi.org/10.1016/j.optlaseng.2023.107879)

# Impact

Expand Down
14 changes: 7 additions & 7 deletions src/oc_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* study and development of 2D, 3D/stereo and volumetric
* digital image correlation.
*
* Copyright (C) 2021, Zhenyu Jiang <zhenyujiang@scut.edu.cn>
* Copyright (C) 2021-2024, Zhenyu Jiang <zhenyujiang@scut.edu.cn>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -19,40 +19,40 @@ namespace opencorr
float** new2D(int dimension1, int dimension2)
{
float** ptr = nullptr;
hCreatePtr(ptr, dimension1, dimension2);
createPtr(ptr, dimension1, dimension2);
return ptr;
}

void delete2D(float**& ptr)
{
if (ptr == nullptr) return;
hDestroyPtr(ptr);
destroyPtr(ptr);
}

float*** new3D(int dimension1, int dimension2, int dimension3)
{
float*** ptr = nullptr;
hCreatePtr(ptr, dimension1, dimension2, dimension3);
createPtr(ptr, dimension1, dimension2, dimension3);
return ptr;
}

void delete3D(float***& ptr)
{
if (ptr == nullptr) return;
hDestroyPtr(ptr);
destroyPtr(ptr);
}

float**** new4D(int dimension1, int dimension2, int dimension3, int dimension4)
{
float**** ptr = nullptr;
hCreatePtr(ptr, dimension1, dimension2, dimension3, dimension4);
createPtr(ptr, dimension1, dimension2, dimension3, dimension4);
return ptr;
}

void delete4D(float****& ptr)
{
if (ptr == nullptr) return;
hDestroyPtr(ptr);
destroyPtr(ptr);
}

}//namespace opencorr
Expand Down
18 changes: 9 additions & 9 deletions src/oc_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* study and development of 2D, 3D/stereo and volumetric
* digital image correlation.
*
* Copyright (C) 2021, Zhenyu Jiang <zhenyujiang@scut.edu.cn>
* Copyright (C) 2021-2024, Zhenyu Jiang <zhenyujiang@scut.edu.cn>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -40,13 +40,13 @@ namespace opencorr

//allocate memory for 2d, 3d, and 4d arrays
template <class Real>
void hCreatePtr(Real*& ptr, int dimension1)
void createPtr(Real*& ptr, int dimension1)
{
ptr = (Real*)calloc(dimension1, sizeof(Real)); //allocate the memory and initialize all the elements with zero
}

template <class Real>
void hCreatePtr(Real**& ptr, int dimension1, int dimension2)
void createPtr(Real**& ptr, int dimension1, int dimension2)
{
Real* ptr1d = (Real*)calloc(dimension1 * dimension2, sizeof(Real));
ptr = (Real**)malloc(dimension1 * sizeof(Real*));
Expand All @@ -58,7 +58,7 @@ namespace opencorr
}

template <class Real>
void hCreatePtr(Real***& ptr, int dimension1, int dimension2, int dimension3)
void createPtr(Real***& ptr, int dimension1, int dimension2, int dimension3)
{
Real* ptr1d = (Real*)calloc(dimension1 * dimension2 * dimension3, sizeof(Real));
Real** ptr2d = (Real**)malloc(dimension1 * dimension2 * sizeof(Real*));
Expand All @@ -75,7 +75,7 @@ namespace opencorr
}

template <class Real>
void hCreatePtr(Real****& ptr, int dimension1, int dimension2, int dimension3, int dimension4)
void createPtr(Real****& ptr, int dimension1, int dimension2, int dimension3, int dimension4)
{
Real* ptr1d = (Real*)calloc(dimension1 * dimension2 * dimension3 * dimension4, sizeof(Real));
Real** ptr2d = (Real**)malloc(dimension1 * dimension2 * dimension3 * sizeof(Real*));
Expand All @@ -98,22 +98,22 @@ namespace opencorr

//release memory of 2d, 3d, and 4d arrays
template <class Real>
void hDestroyPtr(Real*& ptr)
void destroyPtr(Real*& ptr)
{
free(ptr);
ptr = nullptr;
}

template <class Real>
void hDestroyPtr(Real**& ptr)
void destroyPtr(Real**& ptr)
{
free(ptr[0]);
free(ptr);
ptr = nullptr;
}

template<class Real>
void hDestroyPtr(Real***& ptr)
void destroyPtr(Real***& ptr)
{
free(ptr[0][0]);
free(ptr[0]);
Expand All @@ -122,7 +122,7 @@ namespace opencorr
}

template <class Real>
void hDestroyPtr(Real****& ptr)
void destroyPtr(Real****& ptr)
{
free(ptr[0][0][0]);
free(ptr[0][0]);
Expand Down
2 changes: 1 addition & 1 deletion src/oc_calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* study and development of 2D, 3D/stereo and volumetric
* digital image correlation.
*
* Copyright (C) 2021, Zhenyu Jiang <zhenyujiang@scut.edu.cn>
* Copyright (C) 2021-2024, Zhenyu Jiang <zhenyujiang@scut.edu.cn>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
2 changes: 1 addition & 1 deletion src/oc_calibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* study and development of 2D, 3D/stereo and volumetric
* digital image correlation.
*
* Copyright (C) 2021, Zhenyu Jiang <zhenyujiang@scut.edu.cn>
* Copyright (C) 2021-2024, Zhenyu Jiang <zhenyujiang@scut.edu.cn>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
Loading

0 comments on commit c81269c

Please sign in to comment.