Clicky

Fortran Wiki
this_image (changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #2 to #3: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

(追記)

Description

(追記ここまで)
(追記) (追記ここまで)(追記)

Returns the cosubscript for this image.

(追記ここまで)
(追記) (追記ここまで)(追記)

Standard

(追記ここまで)
(追記) (追記ここまで)(追記)

Fortran 2008 and later. With distance argument, TS 18508 or later

(追記ここまで)
(追記) (追記ここまで)(追記)

Class

(追記ここまで)
(追記) (追記ここまで)(追記)

Transformational function

(追記ここまで)
(追記) (追記ここまで)(追記)

Syntax

(追記ここまで)
(追記) (追記ここまで)(追記)
result = this_image()
result = this_image(distance)
result = this_image(coarray [, dim])
(追記ここまで)
(追記) (追記ここまで)(追記)

Arguments

(追記ここまで)
(追記) (追記ここまで)(追記)
  • distance - (optional, intent(in)) Nonnegative scalar integer (not permitted together with coarray).
  • coarray - Coarray of any type (optional; if dim present, required).
  • dim - default integer scalar (optional). If present, dim shall be between one and the corank of coarray.
(追記ここまで)
(追記) (追記ここまで)(追記)

Return value

(追記ここまで)
(追記) (追記ここまで)(追記)

Default integer. If coarray is not present, it is scalar; if distance is not present or has value 0, its value is the image index on the invoking image for the current team, for values smaller or equal distance to the initial team, it returns the image index on the ancestor team which has a distance of distance from the invoking team. If distance is larger than the distance to the initial team, the image index of the initial team is returned. Otherwise when the coarray is present, if dim is not present, a rank-1 array with corank elements is returned, containing the cosubscripts for coarray specifying the invoking image. If dim is present, a scalar is returned, with the value of the dim element of this_image(coarray).

(追記ここまで)
(追記) (追記ここまで)(追記)

Example

(追記ここまで)
(追記) (追記ここまで)(追記)
integer :: value[*]
integer :: i
value = this_image()
sync all
if (this_image() == 1) then
 do i = 1, num_images()
 write(*,'(2(a,i0))') 'value[', i, '] is ', value[i]
 end do
end if
! Check whether the current image is the initial image
if (this_image(huge(1)) /= this_image())
 error stop "something is rotten here"
(追記ここまで)
(追記) (追記ここまで)(追記)

See also

(追記ここまで)
(追記) (追記ここまで)(追記)

num_images, image_index

(追記ここまで)
(追記) (追記ここまで)(追記)

category: intrinsics

(追記ここまで)
Revised on April 4, 2016 21:03:30 by Jason Blevins (173.88.47.127) (1950 characters / 0.0 pages)
Edit | Back in time (2 revisions) | Hide changes | History | Views: Print | TeX | Source | Linked from: Intrinsic procedures, Fortran 2008, image_index, num_images

AltStyle によって変換されたページ (->オリジナル) /