Get the latest tech news

Introduction to the gfortran array descriptor / dope vector


With the approval of Fortran 90, its array capabilities were largely improved. While still far from languages like APL, the extra functionality required a rethinking of the concept array in Fortran. This led to the need for array descriptors in the language.

Fortran 90 introduces LBOUND, UBOUND and SIZE intrinsics that allow us to query the boundaries and number of elements of an array, or one of its dimensions. Assumed-size are like explicit-shape except that their full size and last-rank upper bound is unknown (this restriction pervades all the language in inconvenient ways but is not a technical problem per se). Here gfortran will allocate in the stack a local variable A for a descriptor of rank 2 and then it initializes it with the proper values.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of introduction

introduction

Photo of dope vector

dope vector

Related news:

News photo

An introduction to advanced Rust traits and generics

News photo

Elite Dangerous accused of becoming pay-to-win with introduction of new ship

News photo

An Introduction to Flow Matching