*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/eoshift (3)              
Title
Content
Arch
Section
 

Contents


EOSHIFT(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     EOSHIFT - Performs	an end-off shift on an array expression

SYNOPSIS    [Toc]    [Back]

     EOSHIFT ([ARRAY=]array, [SHIFT=]shift [,[BOUNDARY=]boundary]
     [,[DIM=]dim])

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     The EOSHIFT intrinsic function performs an	end-off	shift on an array
     expression	of rank	one, or	it performs end-off shifts on all the
     complete rank one sections	along a	given array expression of rank two
     or	greater.  Elements are shifted off at one end of a section and
     copies of a boundary value	are shifted in at the other end.  Different
     sections can have different boundary values and can be shifted by
     different amounts and in different	directions; positive for left
     shifts, negative for right	shifts.

     EOSHIFT accepts the following arguments:

     array     May be of any type.  It must not	be scalar.

     shift     Must be integer.	 If array has rank one,	shift must be a
	       scalar.	Otherwise, shift must be scalar	or have	rank n-1
	       and have
	       shape (d	, d , ..., d	 , d	 , ...,	d ),
		       1   2	    dim-1   dim+1	 n
	       where (d	, d , ..., d )
		       1   2	    n
	       is the shape of array.

     boundary  Must be of the same type	and have the same type parameters
	       as array.  Must be scalar if array has rank one;	otherwise,
	       it must be either scalar	or of rank n-1 and of
	       shape (d	, d , ..., d	 , d	 , ...,	d ),
		       1   2	    dim-1   dim+1	 n
	       The boundary argument can be omitted for	the data types in
	       the following list.  In these cases, the	default	value is
	       the scalar value	shown:

	       Type of array	   Default Value of boundary

	       Integer		   0

	       Real		   0.0

	       Complex		   (0.0,0.0)

	       Logical		   false

	       Character(len)	   len blanks

	       The boundary data type must be present for derived data
	       types.

     dim       Must be a scalar.  Must be an integer value in the range
	       1 <= dim	<= n, where n is the rank of array.  If	dim is
	       omitted,	the default value is 1.

     EOSHIFT is	a transformational intrinsic function.	The name of this
     intrinsic cannot be passed	as an argument.

RETURN VALUES    [Toc]    [Back]

     The result	is an array of the same	type, type parameters, and shape as
     array.

     Element (s	, s , ..., s )
	       1   2	    n
     of	the result has the value
     array(s , s , ...,	s     ,	s    + sh, s	 , ...,	s ),
	    1	2	 dim-1	 dim	    dim+1	 n
     where sh is shift or
     shift(s , s , ...,	s     ,	s     ,	..., s ),
	    1	2	 dim-1	 dim+1	      n
     provided that the inequality
     LBOUND(array,dim) <= s    + sh <= UBOUND(array,dim)
			   dim
     holds and is otherwise boundary or
     boundary(s	, s , ..., s	 , s	 , ...,	s ).
	       1   2	    dim-1   dim+1	 n

EXAMPLES    [Toc]    [Back]

     Example 1:	 If V is an array [1, 2, 3, 4, 5, 6], the effect of
     shifting V	end-off	to the left by three positions is achieved by
     EOSHIFT(V,	SHIFT =	3), which has the value	[4, 5, 6, 0, 0,	0].
     Specifying	EOSHIFT(V, SHIFT = -2, BOUNDARY	= 99) achieves an end-off
     shift to the right	by two positions with the boundary value of 99 and
     has the value of [99, 99, 1, 2, 3,	4].

     Example 2:	 The rows of an	array of rank two can all be shifted by	the
     same amount or by different amounts and the boundary elements can be
     the same or different.  Assume that M is the following array:

	| A B C	|

	| D E F	|

	| G H I	|

     The value of EOSHIFT(M, SHIFT =-1,	BOUNDARY = '*',	DIM = 2) is as
     follows:

	| * A B	|

	| * D E	|

	| * G H	|

     The value of EOSHIFT(M, SHIFT =(/ -1, 1, 0	/), BOUNDARY = (/ '*', '/',
     '?' /), DIM = 2) is as follows:

	| * A B	|

	| E F  / |

	| G H I	|

     The value of section EOSHIFT(M(2:3,2:3), SHIFT = -1, BOUNDARY = '*',
     DIM=2) is as follows:

	| * E |

	| * H |

SEE ALSO    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

EOSHIFT(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     EOSHIFT - Performs	an end-off shift on an array expression

SYNOPSIS    [Toc]    [Back]

     EOSHIFT ([ARRAY=]array, [SHIFT=]shift [,[BOUNDARY=]boundary]
     [,[DIM=]dim])

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     The EOSHIFT intrinsic function performs an	end-off	shift on an array
     expression	of rank	one, or	it performs end-off shifts on all the
     complete rank one sections	along a	given array expression of rank two
     or	greater.  Elements are shifted off at one end of a section and
     copies of a boundary value	are shifted in at the other end.  Different
     sections can have different boundary values and can be shifted by
     different amounts and in different	directions; positive for left
     shifts, negative for right	shifts.

     EOSHIFT accepts the following arguments:

     array     May be of any type.  It must not	be scalar.

     shift     Must be integer.	 If array has rank one,	shift must be a
	       scalar.	Otherwise, shift must be scalar	or have	rank n-1
	       and have
	       shape (d	, d , ..., d	 , d	 , ...,	d ),
		       1   2	    dim-1   dim+1	 n
	       where (d	, d , ..., d )
		       1   2	    n
	       is the shape of array.

     boundary  Must be of the same type	and have the same type parameters
	       as array.  Must be scalar if array has rank one;	otherwise,
	       it must be either scalar	or of rank n-1 and of
	       shape (d	, d , ..., d	 , d	 , ...,	d ),
		       1   2	    dim-1   dim+1	 n
	       The boundary argument can be omitted for	the data types in
	       the following list.  In these cases, the	default	value is
	       the scalar value	shown:

	       Type of array	   Default Value of boundary

	       Integer		   0

	       Real		   0.0

	       Complex		   (0.0,0.0)

	       Logical		   false

	       Character(len)	   len blanks

	       The boundary data type must be present for derived data
	       types.

     dim       Must be a scalar.  Must be an integer value in the range
	       1 <= dim	<= n, where n is the rank of array.  If	dim is
	       omitted,	the default value is 1.

     EOSHIFT is	a transformational intrinsic function.	The name of this
     intrinsic cannot be passed	as an argument.

RETURN VALUES    [Toc]    [Back]

     The result	is an array of the same	type, type parameters, and shape as
     array.

     Element (s	, s , ..., s )
	       1   2	    n
     of	the result has the value
     array(s , s , ...,	s     ,	s    + sh, s	 , ...,	s ),
	    1	2	 dim-1	 dim	    dim+1	 n
     where sh is shift or
     shift(s , s , ...,	s     ,	s     ,	..., s ),
	    1	2	 dim-1	 dim+1	      n
     provided that the inequality
     LBOUND(array,dim) <= s    + sh <= UBOUND(array,dim)
			   dim
     holds and is otherwise boundary or
     boundary(s	, s , ..., s	 , s	 , ...,	s ).
	       1   2	    dim-1   dim+1	 n

EXAMPLES    [Toc]    [Back]

     Example 1:	 If V is an array [1, 2, 3, 4, 5, 6], the effect of
     shifting V	end-off	to the left by three positions is achieved by
     EOSHIFT(V,	SHIFT =	3), which has the value	[4, 5, 6, 0, 0,	0].
     Specifying	EOSHIFT(V, SHIFT = -2, BOUNDARY	= 99) achieves an end-off
     shift to the right	by two positions with the boundary value of 99 and
     has the value of [99, 99, 1, 2, 3,	4].

     Example 2:	 The rows of an	array of rank two can all be shifted by	the
     same amount or by different amounts and the boundary elements can be
     the same or different.  Assume that M is the following array:

	| A B C	|

	| D E F	|

	| G H I	|

     The value of EOSHIFT(M, SHIFT =-1,	BOUNDARY = '*',	DIM = 2) is as
     follows:

	| * A B	|

	| * D E	|

	| * G H	|

     The value of EOSHIFT(M, SHIFT =(/ -1, 1, 0	/), BOUNDARY = (/ '*', '/',
     '?' /), DIM = 2) is as follows:

	| * A B	|

	| E F  / |

	| G H I	|

     The value of section EOSHIFT(M(2:3,2:3), SHIFT = -1, BOUNDARY = '*',
     DIM=2) is as follows:

	| * E |

	| * H |

SEE ALSO    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

[ Back ]
 Similar pages
Name OS Title
cshift IRIX Performs a circular shift on an array expression
shiftr IRIX Performs a right shift with zero fill
shifta IRIX Performs an arithmetic shift
dshiftr IRIX Performs a double-object right shift
shiftl IRIX Performs a left shift with zero fill
shift IRIX Performs a left circular shift
dshiftl IRIX Performs a double-object left shift
sem_wait Tru64 Performs (or conditionally performs) a semaphore lock (P1003.1b)
sem_trywait Tru64 Performs (or conditionally performs) a semaphore lock (P1003.1b)
mbsinit Linux test for initial shift state
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service