Advertisement

withall: A Shorthand for Nested for Loop + If Statement

Conference paper
  • 397 Downloads
Part of the Lecture Notes on Data Engineering and Communications Technologies book series (LNDECT, volume 46)

Abstract

The combination of for loop and if statement is very common in array programming. The for loop iterates over the elements in the array, the if statement filters out the required elements and are processed. A shorthand for this combination is developed from the observation that the information required for the loop indexing is often available in the processing statement. We also present a fast and efficient implementation of the loop for Single Dimensional arrays, with a minute increase in time for compilation.

Keywords

Array processing For loop If statement Programming language construct 

Notes

Acknowledgements

The authors express their gratitude to all members of the Chapel development team, especially to Brad Chamberlain and Michael Ferguson for lending a helping hand during the times of dilemma. The time and effort they have spent to prepare lengthy reply mails in the layman’s language deserves thanks beyond words.

References

  1. 1.
  2. 2.
  3. 3.
    Arrays—Chapel Documentation 1.20. https://chapel-lang.org/docs/primers/arrays.html
  4. 4.
  5. 5.
    Grelck, C.: Shared memory multiprocessor support for functional array processing in SAC. J. Funct. Program. 15(3), 353–401 (2005)CrossRefGoogle Scholar
  6. 6.
    Data Structures—Python 3.7.5rc1 documentation. https://docs.python.org/3/tutorial/datastructures.html
  7. 7.
  8. 8.
    Chapel: Productive Parallel Programming. https://chapel-lang.org/
  9. 9.
    Modules—Chapel Documentation 1.20. https://chapel-lang.org/docs/primers/modules.html
  10. 10.
    Iterators—Chapel Documentation 1.20. https://chapel-lang.org/docs/primers/iterators.html
  11. 11.
  12. 12.
    GNU Time - GNU Project - Free Software Foundation. https://www.gnu.org/software/time/

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Rajiv Gandhi Institute of TechnologyKottayamIndia
  2. 2.School of EngineeringCochin University of Science and TechnologyKochiIndia

Personalised recommendations