The processing of a pixel neighborhood is a common operation in image processing. Therefore, a flexible, computationally efficient and easy-to-use strategy for neighborhood traversal is required. In this paper, a new ...
详细信息
The processing of a pixel neighborhood is a common operation in image processing. Therefore, a flexible, computationally efficient and easy-to-use strategy for neighborhood traversal is required. In this paper, a new neighborhood traversal method and its implementation in C++ are presented. In the proposed method, the pixel neighbor access is organized without boundary checks and without image extension, which yields to significant improvements of computational efficiency. The method is based on a partition of the image domain, for which valid neighbor pixel offsets can be precomputed for each subset. The proposed C++ implementation is based on generic programming and can handle images of arbitrary dimensionality. It hides all implementation details from the user and can be extended in order to support additional boundary conditions. The evaluation demonstrates that the proposed method is considerably faster than neighborhood traversal implementations from other libraries. (C) 2012 Elsevier Inc. All rights reserved.
A key benefit of generic programming is its support for producing modules with clean separation. In particular, generic algorithms are written to work with a wide variety of types without requiring modifications to th...
详细信息
A key benefit of generic programming is its support for producing modules with clean separation. In particular, generic algorithms are written to work with a wide variety of types without requiring modifications to them. The Runtime concept idiom extends this support by allowing unmodified concrete types to behave in a runtime polymorphic manner. In this paper, we describe one implementation of the runtime concept idiom, in the domain of the C++ standard template library (STL). We complement the runtime concept idiom with an algorithm library that considers both type and concept information to maximize performance when selecting algorithm implementations. We present two implementations, one in ISO C++ and one using an experimental language extension. We use our implementations to describe and measure the performance of runtime-polymorphic analogs of several STL algorithms. The tests demonstrate the effects of different compile-time vs. run-time algorithm selection choices. (C) 2009 Elsevier B.V. All rights reserved.
The software needs of scientists and engineers are growing and their programs are becoming more compute-heavy and problem-specific. This has led to an influx of non-expert programmers, who need to use and program high...
详细信息
The software needs of scientists and engineers are growing and their programs are becoming more compute-heavy and problem-specific. This has led to an influx of non-expert programmers, who need to use and program high-performance computing platforms. With the continued stagnation of single-threaded performance, using hardware accelerators such as GPUs or FPGAs is necessary. Adapting software to these compute platforms is a difficult task, especially for non-expert programmers, leading to applications being unable to take advantage of new hardware or requiring extensive rewrites. We propose a programming model that allows non-experts to benefit from high-performance computing, while enabling expert programmers to take full advantage of the underlying hardware. In this model, programs are generically typed, the location of the data is encoded in the type system, and multiple dispatch is used to select functionality based on the type of the data. This enables rapid prototyping, retargeting and reuse of existing software, while allowing for hardware specific optimization if required. Our approach allows development to happen in one source language enabling domain experts and performance engineers to jointly develop a program, without the overhead, friction, and challenges associated with developing in multiple programming languages for the same project. We demonstrate the viability and the core principles of this programming model in Julia using realistic examples, showing the potential of this approach for rapid prototyping, and its applicability for real-life engineering. We focus on usability for non-expert programmers and demonstrate that the potential of the underlying hardware can be fully exploited.
The purpose of this work is to present the development of an open-source software based on a discrete description of matter applied to study the behavior of geomaterials. This software uses Object Oriented programming...
详细信息
The purpose of this work is to present the development of an open-source software based on a discrete description of matter applied to study the behavior of geomaterials. This software uses Object Oriented programming techniques, and its methodology design uses three different methods, which are the Discrete Element Method (DEM) [F. Donze, S.A. Magnier, Formulation of a three-dimensional numerical model of brittle behavior, Geophys. J. Int. 122 (1995) 790-802, F. Donze, SA. Magnier, L. Daudeville, C. Mariotti, Numerical study of compressive behaviour of concrete at high strain rates, J. Engrg. Mech. (1999) 1154-1163], the Finite Element Method (FEM) [J. Rousseau, E. Frangin, P. Marin, L. Daudeville, Discrete element modelling of concrete structures and coupling with a finite element model, Comput. Concrete (in print), S.P. Xiao, T. Belytschko, A bridging domain method for coupling continua with molecular dynamics, Comput. Methods Appl. Mech. Engrg. 193 (2004) 1645-1669] and the Lattice Geometrical Method (LGM) [J. Kozicki, Application of discrete models to describe the fracture process in brittle materials, Ph.D. thesis, Gdansk University of Technology, 2007, J. Kozicki, J. Tejchman, 2D lattice model for fracture in brittle materials, Arch. Hydro-Engrg. Environ. Mech. 53 (2) (2006) 71-88, J. Kozicki, J. Tejchman, Effect of aggregate structure on fracture process in concrete using 2D lattice model, Arch. Mech. 59 (4-5) (2007) 365-384, J. Kozicki, J. Tejchman, Modelling of fracture process in concrete using a novel lattice model, Granul. Matter (in print), doi: 10.1007/s10035-008-0104-4]. These methods are implemented within a single object-oriented framework in C++ using OOP design patterns. The bulk of the original work consisted mainly of finding common objects which will work for these different modeling methods without changing a single line of the C++ code. With this approach it is possible to add new numerical models by only plugging-in the corresponding formul
In the context of model-driven engineering, the dynamic (execution) semantics of domain-specific languages (DSLs) is usually not specified explicitly and stays (hard)coded in model transformations and code generation....
详细信息
In the context of model-driven engineering, the dynamic (execution) semantics of domain-specific languages (DSLs) is usually not specified explicitly and stays (hard)coded in model transformations and code generation. This poses challenges such as learning, debugging, understanding, maintaining, and updating a DSL. Facing the lack of supporting tools for specifying the dynamic semantics of DSLs (or programming languages in general), we propose to specify the architecture and the detailed design of the software that implements the DSL, rather than requirements for the behavior expected from DSL programs. To compose such a specification, we use specification templates that capture software design solutions typical for the (application) domain of the DSL. As a result, on the one hand, our approach allows for an explicit and clear definition of the dynamic semantics of a DSL, supports separation of concerns and reuse of typical design solutions. On the other hand, we do not introduce (yet another) specification formalism, but we base our approach on an existing formalism and apply its extensive tool support for verification and validation to the dynamic semantics of a DSL.
The design and implementation of high level tools for parallel programming is a major challenge as the complexity of modern architectures increases. Domain Specific Languages (or DSL) have been proposed as a solution ...
详细信息
The design and implementation of high level tools for parallel programming is a major challenge as the complexity of modern architectures increases. Domain Specific Languages (or DSL) have been proposed as a solution to facilitate this design but few of those DSLs actually take full advantage of said parallel architectures. In this paper, we propose a library-based solution by designing a C++ DSLs using generative programming: NT2. By adapting generative programming idioms so that architecture specificities become mere parameters of the code generation process, we demonstrate that our library can deliver high performance while featuring a high level API and being easy to extend over new architectures. (C) 2014 Elsevier Inc. All rights reserved.
Datatype-generic programs are programs that are parameterised by a datatype. We review the allegorical foundations of a methodology of designing datatype-generic programs. The notion of F-reductivity, where F parametr...
详细信息
Datatype-generic programs are programs that are parameterised by a datatype. We review the allegorical foundations of a methodology of designing datatype-generic programs. The notion of F-reductivity, where F parametrises a datatype, is reviewed and a number of its properties are presented. The properties are used to give concise, effective proofs of termination of a number of datatype-generic programming schemas. The paper concludes with a concise proof of the well-foundedness of a datatype-generic occurs-in relation.
Performant numerical solving of differential equations is required for large-scale scientific modeling. In this manuscript we focus on two questions: (1) how can researchers empirically verify theoretical advances and...
详细信息
Performant numerical solving of differential equations is required for large-scale scientific modeling. In this manuscript we focus on two questions: (1) how can researchers empirically verify theoretical advances and consistently compare methods in production software settings and (2) how can users (scientific domain experts) keep up with the state-of-the-art methods to select those which are most appropriate? Here we describe how the confederated modular API of *** addresses these concerns. We detail the package-free API which allows numerical methods researchers to readily utilize and benchmark any compatible method directly in full-scale scientific applications. In addition, we describe how the complexity of the method choices is abstracted via a polyalgorithm. We show how scientific tooling built on top of ***, such as packages for dynamical systems quantification and quantum optics simulation, both benefit from this structure and provide themselves as convenient benchmarking tools.
Local consistency techniques for numerical constraints over interval domains combine interval arithmetic, constraint inversion and bisection to reduce variable domains. In this paper, we study the problem of integrati...
详细信息
Local consistency techniques for numerical constraints over interval domains combine interval arithmetic, constraint inversion and bisection to reduce variable domains. In this paper, we study the problem of integrating any specific interval arithmetic library in constraint solvers. For this purpose, we design an interface between consistency algorithms and arithmetic. The interface has a two-level architecture: functional interval arithmetic at low-level, which is only a specification to be implemented by specific libraries, and a set of operations required by solvers, such as relational interval arithmetic or bisection primitives. This work leads to the implementation of an interval component by means of C++ generic programming methods. The overhead resulting from generic programming is discussed. (C) 2003 Elsevier B.V. All rights reserved.
In the Density Matrix Renormalization Group (DMRG) algorithm (White, 1992, 1993)11,2], Hamiltonian symmetries play an important role. Using symmetries, the matrix representation of the Hamiltonian can be blocked. Diag...
详细信息
In the Density Matrix Renormalization Group (DMRG) algorithm (White, 1992, 1993)11,2], Hamiltonian symmetries play an important role. Using symmetries, the matrix representation of the Hamiltonian can be blocked. Diagonalizing each matrix block is more efficient than diagonalizing the original matrix. This paper explains how the the DMRG++ code (Alvarez, 2009)131 has been extended to handle the non-local SU(2) symmetry in a model independent way. Improvements in CPU times compared to runs with only local symmetries are discussed for the one-orbital Hubbard model, and for a two-orbital Hubbard model for iron-based superconductors. The computational bottleneck of the algorithm and the use of shared memory parallelization are also addressed. Program summary Program title: DMRG++ Catalog identifier: AEDj_v2_0 Program summary URL: http://***/summaries/AEDj_v2_*** Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland Licensing provisions: Special license. See http://***/licence/AEDJ_v2_*** No. of lines in distributed program, including test data, etc.: 211560 No. of bytes in distributed program, including test data, etc.: 10572185 Distribution format: *** programming language: C++. Computer: PC. Operating system: Multiplatform, tested on Linux. Has the code been vectorized or parallelized?: Yes. 1 to 8 processors with MPI, 2 to 4 cores with pthreads. RAM: 1GB (256MB is enough to run the included test) Classification: 23. Catalog identifier of previous version: AEDj_v 1_0 Journal reference of previous version: Comput. Phys. Comm. 180(2009)1572 External routines: BLAS and LAPACK Nature of problem: Strongly correlated electrons systems, display a broad range of important phenomena, and their study is a major area of research in condensed matter physics. In this context, model Hamiltonians are used to simulate the relevant interactions of a given compound, and the relevant degrees of freedom. These studies rel
暂无评论