Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Pointers 指向向量下标的fortran指针_Pointers_Fortran - Fatal编程技术网

Pointers 指向向量下标的fortran指针

Pointers 指向向量下标的fortran指针,pointers,fortran,Pointers,Fortran,我正在尝试做类似的事情: integer, dimension(:), allocatable :: abfi real, dimension(5),target :: testt real, pointer :: testp(:) testt=(/2,.1,.2,1,1/) . . allocate( abfi( count(testt.ge..5) ) ) abfi=pack([(ix,ix=1,size(testt))],testt.ge..5) testp =>

我正在尝试做类似的事情:

integer, dimension(:), allocatable :: abfi   
real, dimension(5),target :: testt
real, pointer :: testp(:)
testt=(/2,.1,.2,1,1/)
.
.
allocate( abfi( count(testt.ge..5) ) )
abfi=pack([(ix,ix=1,size(testt))],testt.ge..5)      
testp => testt(abfi)
所以,我想直接指向一个屏蔽子阵列,但这似乎是不可能的。 有什么建议吗?
谢谢

是的,我有一个连续变化的数组,在这个数组中,我必须检查哪些元素的值低于某个阈值,以便对原始数组的这一部分执行其他操作。我不是Fortan方面的专家,但我已经看到,一般来说,指针数组在计算时间方面非常有效;因此,我想知道是否有可能直接使用指向“屏蔽”原始数组的指针子数组。是的,我有一个连续变化的数组,其中我必须检查哪些元素在某个阈值下假定值,以便对原始数组的这一部分执行其他操作。我不是Fortan方面的专家,但我已经看到,一般来说,指针数组在计算时间方面非常有效;因此,我想知道是否可以直接使用指向“屏蔽”原始数组的指针子数组。