Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loadbalancing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SLMS
loadbalancing
Commits
b2866326
Commit
b2866326
authored
Jun 7, 2019
by
Stephan Schulz
Browse files
Options
Downloads
Patches
Plain Diff
add set_min_domain_size interface
parent
aab06d98
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ALL_fortran.cpp
+7
-0
7 additions, 0 deletions
src/ALL_fortran.cpp
src/ALL_module.f90
+12
-0
12 additions, 0 deletions
src/ALL_module.f90
with
19 additions
and
0 deletions
src/ALL_fortran.cpp
+
7
−
0
View file @
b2866326
...
@@ -39,6 +39,13 @@ extern "C"
...
@@ -39,6 +39,13 @@ extern "C"
return
new
ALL
<
double
,
double
>
(
dim
,
gamma
);
return
new
ALL
<
double
,
double
>
(
dim
,
gamma
);
}
}
// wrapper to set the minimum domain size
void
ALL_set_min_domain_size_f
(
ALL
<
double
,
double
>*
all_obj
,
int
dim
,
double
*
domain_size
)
{
if
(
all_obj
->
get_dimension
()
!=
dim
)
throw
ALL_Invalid_Argument_Exception
(
__FILE__
,
__func__
,
__LINE__
,
"Length of array does not match dimension"
);
all_obj
->
set_min_domain_size
(
domain_size
);
}
// wrapper to set the work (scalar only for the moment)
// wrapper to set the work (scalar only for the moment)
void
ALL_set_work_f
(
ALL
<
double
,
double
>*
all_obj
,
double
work
)
void
ALL_set_work_f
(
ALL
<
double
,
double
>*
all_obj
,
double
work
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/ALL_module.f90
+
12
−
0
View file @
b2866326
...
@@ -49,6 +49,12 @@ MODULE ALL_module
...
@@ -49,6 +49,12 @@ MODULE ALL_module
REAL
(
c_double
),
VALUE
::
gamma
REAL
(
c_double
),
VALUE
::
gamma
TYPE
(
c_ptr
)
::
this
TYPE
(
c_ptr
)
::
this
END
FUNCTION
END
FUNCTION
SUBROUTINE
ALL_set_min_domain_size_int
(
obj
,
dim
,
domain_size
)
BIND
(
C
,
NAME
=
"ALL_set_min_domain_size_f"
)
USE
ISO_C_BINDING
INTEGER
(
c_int
),
VALUE
::
dim
REAL
(
c_double
),
DIMENSION
(
n
)
::
domain_size
TYPE
(
c_ptr
),
VALUE
::
obj
END
SUBROUTINE
SUBROUTINE
ALL_set_work_int
(
obj
,
work
)
BIND
(
C
,
NAME
=
"ALL_set_work_f"
)
SUBROUTINE
ALL_set_work_int
(
obj
,
work
)
BIND
(
C
,
NAME
=
"ALL_set_work_f"
)
USE
ISO_C_BINDING
USE
ISO_C_BINDING
REAL
(
c_double
),
VALUE
::
work
REAL
(
c_double
),
VALUE
::
work
...
@@ -105,6 +111,12 @@ MODULE ALL_module
...
@@ -105,6 +111,12 @@ MODULE ALL_module
REAL
(
8
)
::
gamma
REAL
(
8
)
::
gamma
obj
%
object
=
ALL_init_int
(
INT
(
dim
,
c_int
),
REAL
(
gamma
,
c_double
))
obj
%
object
=
ALL_init_int
(
INT
(
dim
,
c_int
),
REAL
(
gamma
,
c_double
))
END
SUBROUTINE
END
SUBROUTINE
SUBROUTINE
ALL_set_min_domain_size
(
obj
,
dim
,
domain_size
)
INTEGER
::
dim
REAL
(
8
),
DIMENSION
(
n
)
::
domain_size
TYPE
(
ALL_t
)
::
obj
CALL
ALL_set_min_domain_size
(
obj
%
object
,
dim
,
domain_size
)
END
SUBROUTINE
SUBROUTINE
ALL_set_work
(
obj
,
work
)
SUBROUTINE
ALL_set_work
(
obj
,
work
)
TYPE
(
ALL_t
)
::
obj
TYPE
(
ALL_t
)
::
obj
REAL
(
8
)
::
work
REAL
(
8
)
::
work
...
...
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