Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
de690d2a
Commit
de690d2a
authored
Mar 11, 2024
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Always refer to np_int definition
parent
ce097c1c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cluster/cluster.cpp
+13
-13
13 additions, 13 deletions
src/cluster/cluster.cpp
src/include/lapack_calls.h
+2
-2
2 additions, 2 deletions
src/include/lapack_calls.h
src/libnptm/lapack_calls.cpp
+2
-2
2 additions, 2 deletions
src/libnptm/lapack_calls.cpp
with
17 additions
and
17 deletions
src/cluster/cluster.cpp
+
13
−
13
View file @
de690d2a
...
@@ -13,6 +13,17 @@
...
@@ -13,6 +13,17 @@
#include
"../include/types.h"
#include
"../include/types.h"
#endif
#endif
#ifdef USE_LAPACK
#ifdef USE_MKL
#include
<mkl_lapacke.h>
#else
#include
<lapacke.h>
#endif
#ifndef INCLUDE_LAPACK_CALLS_H_
#include
"../include/lapack_calls.h"
#endif
#endif
#ifndef INCLUDE_ERRORS_H_
#ifndef INCLUDE_ERRORS_H_
#include
"../include/errors.h"
#include
"../include/errors.h"
#endif
#endif
...
@@ -37,17 +48,6 @@
...
@@ -37,17 +48,6 @@
#include
"../include/TransitionMatrix.h"
#include
"../include/TransitionMatrix.h"
#endif
#endif
#ifdef USE_LAPACK
#ifdef USE_MKL
#include
<mkl_lapacke.h>
#else
#include
<lapacke.h>
#endif
#ifndef INCLUDE_LAPACK_CALLS_H_
#include
"../include/lapack_calls.h"
#endif
#endif
#ifndef INCLUDE_ALGEBRAIC_H_
#ifndef INCLUDE_ALGEBRAIC_H_
#include
"../include/algebraic.h"
#include
"../include/algebraic.h"
#endif
#endif
...
@@ -86,7 +86,7 @@ void cluster(string config_file, string data_file, string output_path) {
...
@@ -86,7 +86,7 @@ void cluster(string config_file, string data_file, string output_path) {
if
(
sconf
->
number_of_spheres
==
gconf
->
number_of_spheres
)
{
if
(
sconf
->
number_of_spheres
==
gconf
->
number_of_spheres
)
{
// Shortcuts to variables stored in configuration objects
// Shortcuts to variables stored in configuration objects
int
nsph
=
gconf
->
number_of_spheres
;
int
nsph
=
gconf
->
number_of_spheres
;
lapack
_int
mxndm
=
(
lapack
_int
)
gconf
->
mxndm
;
np
_int
mxndm
=
(
np
_int
)
gconf
->
mxndm
;
int
inpol
=
gconf
->
in_pol
;
int
inpol
=
gconf
->
in_pol
;
int
npnt
=
gconf
->
npnt
;
int
npnt
=
gconf
->
npnt
;
int
npntts
=
gconf
->
npntts
;
int
npntts
=
gconf
->
npntts
;
...
@@ -144,7 +144,7 @@ void cluster(string config_file, string data_file, string output_path) {
...
@@ -144,7 +144,7 @@ void cluster(string config_file, string data_file, string output_path) {
if
(
sconf
->
iog_vec
[
ci
-
1
]
>=
ci
)
configurations
++
;
if
(
sconf
->
iog_vec
[
ci
-
1
]
>=
ci
)
configurations
++
;
}
}
C2
*
c2
=
new
C2
(
nsph
,
configurations
,
npnt
,
npntts
);
C2
*
c2
=
new
C2
(
nsph
,
configurations
,
npnt
,
npntts
);
lapack
_int
ndit
=
2
*
nsph
*
c4
->
nlim
;
np
_int
ndit
=
2
*
nsph
*
c4
->
nlim
;
dcomplex
*
am_vector
=
new
dcomplex
[
ndit
*
ndit
]();
dcomplex
*
am_vector
=
new
dcomplex
[
ndit
*
ndit
]();
dcomplex
**
am
=
new
dcomplex
*
[
ndit
];
dcomplex
**
am
=
new
dcomplex
*
[
ndit
];
for
(
int
ai
=
0
;
ai
<
ndit
;
ai
++
)
{
for
(
int
ai
=
0
;
ai
<
ndit
;
ai
++
)
{
...
...
This diff is collapsed.
Click to expand it.
src/include/lapack_calls.h
+
2
−
2
View file @
de690d2a
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
* matrix with double precision elements.
* matrix with double precision elements.
*
*
* \param mat: Matrix of complex. The matrix to be inverted.
* \param mat: Matrix of complex. The matrix to be inverted.
* \param n: `
lapack
_int` The number of rows and columns of the [n x n] matrix.
* \param n: `
np
_int` The number of rows and columns of the [n x n] matrix.
* \param jer: `int &` Reference to an integer return flag.
* \param jer: `int &` Reference to an integer return flag.
*/
*/
void
zinvert
(
dcomplex
**
mat
,
lapack
_int
n
,
int
&
jer
);
void
zinvert
(
dcomplex
**
mat
,
np
_int
n
,
int
&
jer
);
#endif
#endif
This diff is collapsed.
Click to expand it.
src/libnptm/lapack_calls.cpp
+
2
−
2
View file @
de690d2a
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#endif
#endif
#ifdef USE_LAPACK
#ifdef USE_LAPACK
void
zinvert
(
dcomplex
**
mat
,
lapack
_int
n
,
int
&
jer
)
{
void
zinvert
(
dcomplex
**
mat
,
np
_int
n
,
int
&
jer
)
{
jer
=
0
;
jer
=
0
;
dcomplex
*
arr
=
&
(
mat
[
0
][
0
]);
dcomplex
*
arr
=
&
(
mat
[
0
][
0
]);
const
dcomplex
uim
=
0.0
+
1.0
*
I
;
const
dcomplex
uim
=
0.0
+
1.0
*
I
;
...
@@ -30,7 +30,7 @@ void zinvert(dcomplex **mat, lapack_int n, int &jer) {
...
@@ -30,7 +30,7 @@ void zinvert(dcomplex **mat, lapack_int n, int &jer) {
MKL_Complex16
*
arr2
=
(
MKL_Complex16
*
)
arr
;
MKL_Complex16
*
arr2
=
(
MKL_Complex16
*
)
arr
;
#endif
#endif
lapack
_int
*
IPIV
=
new
lapack
_int
[
n
]();
np
_int
*
IPIV
=
new
np
_int
[
n
]();
#ifdef USE_MKL
#ifdef USE_MKL
LAPACKE_zgetrf
(
LAPACK_ROW_MAJOR
,
n
,
n
,
arr2
,
n
,
IPIV
);
LAPACKE_zgetrf
(
LAPACK_ROW_MAJOR
,
n
,
n
,
arr2
,
n
,
IPIV
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment