Tomoyoshi Shimobaba, Jiantong Weng, Takahiro Sakurai, Naohisa Okada, Takashi Nishitsuji, Naoki Takada, Atsushi Shiraki, Nobuyuki Masuda, Tomoyoshi Ito
COMPUTER PHYSICS COMMUNICATIONS 183(5) 1124-1138 2012年5月 査読有り
Diffraction calculations, such as the angular spectrum method and Fresnel diffractions, are used for calculating scalar light propagation. The calculations are used in wide-ranging optics fields: for example, Computer Generated Holograms (CGHs), digital holography, diffractive optical elements, microscopy, image encryption and decryption, three-dimensional analysis for optical devices and so on. However, increasing demands made by large-scale diffraction calculations have rendered the computational power of recent computers insufficient. We have already developed a numerical library for diffraction calculations using a Graphic Processing Unit (GPU), which was named the GWO library. However, this GWO library is not user-friendly, since it is based on C language and was also run only on a GPU. In this paper, we develop a new C++ class library for diffraction and CGH calculations, which is referred to as a CWO++ library, running on a CPU and GPU. We also describe the structure, performance, and usage examples of the CWO++ library.
Program summary
Program title: CWO++
Catalogue identifier: AELL_v1_0
Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AELL_v1_0.html
Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland
Licensing provisions: Standard CPC licence, http://cpc.cs.qub.ac.uk/licence/licence.html
No. of lines in distributed program, including test data, etc.: 109 809
No. of bytes in distributed program, including test data, etc.: 4 181 911
Distribution format: tar.gz
Programming language: C++
Computer: General computers and general computers with NVIDIA GPUs
Operating system: Windows XP, Vista, 7
Has the code been vectorized or parallelized?: Yes. 1 core processor used in CPU and many cores in GPU.
RAM: 256 M bytes
Classification: 18
External routines: CImg, FFTW
Nature of problem: The CWO++ library provides diffraction calculations which are useful for Computer Generated Holograms (CGHs), digital holography, diffractive optical elements, microscopy, image encryption and decryption and three-dimensional analysis for optical devices.
Solution method: FFT-based diffraction calculations, computer generated holograms by direct integration.
Running time: The sample runs provided take approximately 5 minutes for the C++ version and 5 seconds for the C++ with GPUs version. (c) 2012 Elsevier B.V. All rights reserved.