Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / domdec / localatomset.h
index 6396505153fe88c87b219217356e78cee8bd0c96..594c18b5c2169f1028c704d4d728d096ac9e686d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -51,7 +51,7 @@ namespace gmx
 namespace internal
 {
 class LocalAtomSetData;
-}   // namespace internal
+} // namespace internal
 /*! \libinternal \brief
  * A local atom set collects local, global and collective indices of
  * the home atoms on a rank. The indices of the home atoms are automatically
@@ -67,55 +67,55 @@ class LocalAtomSetData;
  */
 class LocalAtomSet
 {
-    public:
-        friend class LocalAtomSetManager;
-        /*! \brief Maps indices on rank [0..numAtomsLocal_) to global atom indicices.
-         *
-         * \returns the collective index.
-         */
-        ArrayRef<const int> collectiveIndex() const;
-        /*! \brief Global indices of the atoms in this set.
-         *
-         * \note For best performance, store and use a local copy of the arrayref.
-         *
-         * \returns the global index.
-         */
-        ArrayRef<const int> globalIndex() const;
-        /*! \brief Local indices of the atoms.
-         *
-         * For example, the i-th local atom coordinate of this set is
-         * x[atomSet.localIndex()[i]].
-         *
-         * When using in a loop other than a range-based for loop,
-         * performance may improve if the ArrayRef is stored in
-         * a local variable before the loop is entered.
-         * Updated within domain-decomposition.
-         *
-         * \note For best performance, store and use a local copy of the ArrayRef.
-         *
-         * \returns the local index.
-         */
-        ArrayRef<const int> localIndex() const;
-        /*! \brief The number of atoms from this group index on this rank.
-         *
-         * \note For best performance, store and use a local copy of the ArrayRef.
-         */
-        std::size_t numAtomsLocal() const;
-        /*! \brief The number of all atoms from this group index on all ranks together.
-         *
-         * \note For best performance, store and use a local copy.
-         */
-        std::size_t numAtomsGlobal() const;
-    private:
-        /*! \brief Constructs a new atom set by setting a reference to its
-         * internal data.
-         * \param[in] data The data for the atom set is stored
-         * in LocalAtomSetData, which is manged by \ref gmx::LocalAtomSetManager.
-         */
-        explicit LocalAtomSet(const internal::LocalAtomSetData &data);
+public:
+    friend class LocalAtomSetManager;
+    /*! \brief Maps indices on rank [0..numAtomsLocal_) to global atom indicices.
+     *
+     * \returns the collective index.
+     */
+    ArrayRef<const int> collectiveIndex() const;
+    /*! \brief Global indices of the atoms in this set.
+     *
+     * \note For best performance, store and use a local copy of the arrayref.
+     *
+     * \returns the global index.
+     */
+    ArrayRef<const int> globalIndex() const;
+    /*! \brief Local indices of the atoms.
+     *
+     * For example, the i-th local atom coordinate of this set is
+     * x[atomSet.localIndex()[i]].
+     *
+     * When using in a loop other than a range-based for loop,
+     * performance may improve if the ArrayRef is stored in
+     * a local variable before the loop is entered.
+     * Updated within domain-decomposition.
+     *
+     * \note For best performance, store and use a local copy of the ArrayRef.
+     *
+     * \returns the local index.
+     */
+    ArrayRef<const int> localIndex() const;
+    /*! \brief The number of atoms from this group index on this rank.
+     *
+     * \note For best performance, store and use a local copy of the ArrayRef.
+     */
+    std::size_t numAtomsLocal() const;
+    /*! \brief The number of all atoms from this group index on all ranks together.
+     *
+     * \note For best performance, store and use a local copy.
+     */
+    std::size_t numAtomsGlobal() const;
 
-        const internal::LocalAtomSetData * data_;
+private:
+    /*! \brief Constructs a new atom set by setting a reference to its
+     * internal data.
+     * \param[in] data The data for the atom set is stored
+     * in LocalAtomSetData, which is manged by \ref gmx::LocalAtomSetManager.
+     */
+    explicit LocalAtomSet(const internal::LocalAtomSetData& data);
 
+    const internal::LocalAtomSetData* data_;
 };
 
 } // namespace gmx