Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Budiardja, Reuben
Fortran Frontier
Commits
0c541bde
Commit
0c541bde
authored
Aug 25, 2020
by
Budiardja, Reuben
Browse files
Added simpler test case for C_Descriptor
parent
56e6e8ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Cases/Fortran2018/C_DescriptorSimple/C_Desc.c
0 → 100644
View file @
0c541bde
#include
<stdlib.h>
#include
<stdio.h>
#include
"ISO_Fortran_binding.h"
void
C_Desc
(
CFI_cdesc_t
*
A_DV
)
{
printf
(
"A_DV.rank: %d
\n
"
,
A_DV
->
rank
);
}
Cases/Fortran2018/C_DescriptorSimple/C_Desc.f90
0 → 100644
View file @
0c541bde
module
C_DescMod
use
iso_c_binding
implicit
none
public
interface
subroutine
C_Desc
(
A
)
bind
(
c
,
name
=
'C_Desc'
)
use
iso_c_binding
implicit
none
real
,
dimension
(
:,
:,
:
),
allocatable
,
&
intent
(
out
)
::
&
A
end
subroutine
C_Desc
end
interface
end
module
C_DescMod
program
C_DescProg
use
C_DescMod
implicit
none
real
,
dimension
(
:,
:,
:
),
allocatable
::
&
Array
print
*
,
'Fortran: rank:'
,
rank
(
Array
)
call
C_Desc
(
Array
)
end
program
C_DescProg
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment