1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> 2 3<!--Converted with LaTeX2HTML 2018.3 (Released July 19, 2018) --> 4<HTML lang="EN"> 5<HEAD> 6<TITLE>long_count, long_size</TITLE> 7<META NAME="description" CONTENT="long_count, long_size"> 8<META NAME="keywords" CONTENT="subroutines"> 9<META NAME="resource-type" CONTENT="document"> 10<META NAME="distribution" CONTENT="global"> 11 12<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> 13<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> 14<META NAME="Generator" CONTENT="LaTeX2HTML v2018.3"> 15 <link rel='apple-touch-icon' sizes='180x180' href='images/favicons/apple-touch-icon.png?v=2017'> 16 <link rel='icon' type='image/png' sizes='32x32' href='images/favicons/favicon-32x32.png?v=2017'> 17 <link rel='icon' type='image/png' sizes='16x16' href='images/favicons/favicon-16x16.png?v=2017'> 18 <link rel='manifest' href='images/favicons/manifest.json?v=2017'> 19 <link rel='mask-icon' href='images/favicons/safari-pinned-tab.svg?v=2017' color='#5bbad5'> 20 <link rel='shortcut icon' href='images/favicons/favicon.ico?v=2017'> 21 <meta name='apple-mobile-web-app-title' content='HEALPix'> 22 <meta name='application-name' content='HEALPix'> 23 <meta name='msapplication-config' content='images/favicons/browserconfig.xml?v=2017'> 24 <meta name='theme-color' content='#ffffff'> 25 26<LINK REL="STYLESHEET" HREF="subroutines.css"> 27 28<LINK REL="next" HREF="sub_map2alm.htm"> 29<LINK REL="previous" HREF="sub_input_tod.htm"> 30<LINK REL="next" HREF="sub_map2alm.htm"> 31</HEAD> 32 33<body text="#000000" bgcolor="#FFFFFA"> 34 35<DIV CLASS="navigation"><!--Navigation Panel--> 36<A 37 HREF="sub_input_tod.htm"> 38<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A> 39<A 40 HREF="sub_HEALPix_F90_subroutines.htm"> 41<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A> 42<A 43 HREF="sub_map2alm.htm"> 44<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A> 45<A ID="tex2html386" 46 HREF="sub_TABLE_CONTENTS.htm"> 47<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A> 48<BR> 49<B> Previous:</B> <A 50 HREF="sub_input_tod.htm">input_tod*</A> 51 52<B>Up:</B> <A 53 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A> 54 55<B> Next:</B> <A 56 HREF="sub_map2alm.htm">map2alm*</A> 57<B> Top:</B> <a href="main.htm">Main Page</a></DIV> 58<!--End of Navigation Panel--> 59 60<H1><A ID="SECTION4700"></A> 61<A ID="sub:long_intrinsic"></A> 62<BR> 63 64</H1> 65 66<P> 67<b><font size=+6><FONT COLOR="#CC0000">long_count, long_size</FONT></font></b><hr> 68<H3>The Fortran90 module <TT>long_intrinsic</TT> contains a subset of 69intrinsic functions (currently <TT>count</TT> and <TT>size</TT>) compiled so that they return <A HREF="sub_healpix_types_module.htm#sub:healpix_types">I8B</A> variables 70instead of the default integer (generally <A HREF="sub_healpix_types_module.htm#sub:healpix_types">I4B</A>), 71therefore allowing the handling of arrays with more than <SPAN CLASS="MATH">2<SUP>31</SUP>-1</SPAN> 72elements.</H3> 73Location in HEALPix directory tree: <a href="https://sourceforge.net/p/healpix/code/1005/tree/trunk/src/f90/mod/long_intrinsic.F90"><b>src/f90/mod/long_intrinsic.F90</b></a> 74 75<P> 76 77<BIG CLASS="LARGE"><SPAN CLASS="textbf">FUNCTIONS: </SPAN></BIG> 78<BR> 79<TT><A HREF="#sub:long_intrinsic:cnt">cnt</A> = long_count(<A HREF="#sub:long_intrinsic:mask1">mask1</A>)</TT> 80 81<P> 82<TABLE CELLPADDING=3> 83<TR><TD ALIGN="LEFT"> </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150> </TD> 84<TD ALIGN="LEFT"> </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=350>returns the I8B integer value that is 85the number of elements of the logical array <TT>mask1</TT> that have the value <TT>true</TT>.</TD> 86<TD ALIGN="LEFT"> </TD></TR> 87</TABLE> 88<BR> 89<P> 90<TT><A HREF="#sub:long_intrinsic:sz">sz</A> = long_size(<A HREF="#sub:long_intrinsic:array1">array1</A> 91[,<A HREF="#sub:long_intrinsic:dim">dim</A>])</TT> 92<BR><TT><A HREF="#sub:long_intrinsic:sz">sz</A> = long_size(<A HREF="#sub:long_intrinsic:array2">array2</A> 93[,<A HREF="#sub:long_intrinsic:dim">dim</A>])</TT> 94 95<P> 96<TABLE CELLPADDING=3> 97<TR><TD ALIGN="LEFT"> </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150> </TD> 98<TD ALIGN="LEFT"> </TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=350>returns the I8B integer value that is 99the size of the 1D array <TT>array1</TT> or 2D array <TT>array2</TT> or their 100extent along the dimension <TT>dim</TT> if the scalar integer <TT>dim</TT> is provided.</TD> 101<TD ALIGN="LEFT"> </TD></TR> 102</TABLE> 103<BR> 104<P> 105<hr><H1>ARGUMENTS</H1> 106 107<TABLE CELLPADDING=3 BORDER="1"> 108<TR><TH ALIGN="LEFT" VALIGN="TOP" WIDTH=150><SPAN CLASS="textbf">name & dimensionality</SPAN></TH> 109<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=25><SPAN CLASS="textbf">kind</SPAN></TH> 110<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=40><SPAN CLASS="textbf">in/out</SPAN></TH> 111<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=235><SPAN CLASS="textbf">description</SPAN></TH> 112</TR> 113<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150> </TD> 114<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25> </TD> 115<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40> </TD> 116<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=235> </TD> 117</TR> 118<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150> 119cnt <A ID="sub:long_intrinsic:cnt"></A></TD> 120<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I8B</TD> 121<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>OUT</TD> 122<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=235>number of elements with value <TT>true</TT></TD> 123</TR> 124<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150>sz <A ID="sub:long_intrinsic:sz"></A></TD> 125<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I8B</TD> 126<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>OUT</TD> 127<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=235>size or extent of array</TD> 128</TR> 129<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150>mask1(:) <A ID="sub:long_intrinsic:mask1"></A></TD> 130<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>LGT</TD> 131<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 132<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=235>1D logical array</TD> 133</TR> 134<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150>array1(:) <A ID="sub:long_intrinsic:array1"></A></TD> 135<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B/ I8B/ SP/ DP</TD> 136<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 137<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=235>1D integer or real array</TD> 138</TR> 139<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150>array2(:,:) <A ID="sub:long_intrinsic:array2"></A></TD> 140<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B/ I8B/ SP/ DP</TD> 141<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 142<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=235>2D integer or real array</TD> 143</TR> 144<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=150>dim <A ID="sub:long_intrinsic:dim"></A> (OPTIONAL)</TD> 145<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=25>I4B</TD> 146<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=40>IN</TD> 147<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=235>dimension (starting at 1) along which the array 148extent is measured.</TD> 149</TR> 150</TABLE> 151 152<P> 153<HR><H1>EXAMPLE:</H1> 154<tt>use <A HREF="sub_healpix_modules_module.htm#sub:healpix_modules">healpix_modules</A> 155<BR> 156real(SP), dimension(:,:), allocatable :: bigarray 157<BR> 158allocate(bigarray(2_i8b**31+5, 3)) 159<BR> 160print*, size(bigarray), size(bigarray,1), size(bigarray,dim=2) 161<BR> 162print*, long_size(bigarray), long_size(bigarray,1), long_size(bigarray,dim=2) 163<BR> 164deallocate(bigarray)</tt> 165<blockquote>Will return (with default compilation options) 166<PRE><TT> 167 -2147483633 -2147483643 3 168<BR> 1696442450959 2147483653 3 170</TT></PRE> 171meaning that <TT>long_size</TT> handles correctly this large array while by default 172<TT>size</TT> does not.</blockquote> 173 174<P> 175 176<P> 177 178 179<P> 180 181<DIV CLASS="navigation"><HR> 182<!--Navigation Panel--> 183<A 184 HREF="sub_input_tod.htm"> 185<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A> 186<A 187 HREF="sub_HEALPix_F90_subroutines.htm"> 188<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A> 189<A 190 HREF="sub_map2alm.htm"> 191<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A> 192<A ID="tex2html386" 193 HREF="sub_TABLE_CONTENTS.htm"> 194<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A> 195<BR> 196<B> Previous:</B> <A 197 HREF="sub_input_tod.htm">input_tod*</A> 198 199<B>Up:</B> <A 200 HREF="sub_HEALPix_F90_subroutines.htm">HEALPix/F90 subroutines</A> 201 202<B> Next:</B> <A 203 HREF="sub_map2alm.htm">map2alm*</A> 204<B> Top:</B> <a href="main.htm">Main Page</a></DIV> 205<!--End of Navigation Panel--> 206<ADDRESS> 207Version 3.50, 2018-12-10 208</ADDRESS> 209</BODY> 210</HTML> 211