Skip to content

Commit

Permalink
Merge pull request #740 from streeve/fixup_spelling
Browse files Browse the repository at this point in the history
Comment spelling using codespell
  • Loading branch information
streeve authored Mar 25, 2024
2 parents 9a1ad60 + 33f70bc commit 0757378
Show file tree
Hide file tree
Showing 38 changed files with 85 additions and 85 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
- CUDA and HIP support and testing in continuous integration
- Mirror view capability for AoSoA
- New performance benchmarks for sorting, communication, and neighbor lists
- Improving AoSoA memory managment with empty() and shrinkToFit()
- Improving AoSoA memory management with empty() and shrinkToFit()
- Second level neighbor parallel for and reduce algorithms for triplet operations
- Unmanaged AoSoA for wrapping user memory

Expand Down
6 changes: 3 additions & 3 deletions core/src/Cabana_CommunicationPlan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ class CommunicationPlan
\brief Get the number of export elements.
\return The number of export elements.
Whenever the communciation plan is applied, this is the total number of
Whenever the communication plan is applied, this is the total number of
elements expected to be input on the sending ranks (in the forward
communication plan). This will be different than the number returned by
totalNumExport() if some of the export ranks used in the construction
Expand Down Expand Up @@ -928,7 +928,7 @@ class CommunicationPlan
\brief Create the export steering vector.
Creates an array describing which export element ids are moved to which
location in the send buffer of the communcation plan. Ordered such that
location in the send buffer of the communication plan. Ordered such that
if a rank sends to itself then those values come first.
\param neighbor_ids The id of each element in the neighbor send buffers.
Expand All @@ -951,7 +951,7 @@ class CommunicationPlan
\brief Create the export steering vector.
Creates an array describing which export element ids are moved to which
location in the contiguous send buffer of the communcation plan. Ordered
location in the contiguous send buffer of the communication plan. Ordered
such that if a rank sends to itself then those values come first.
\param neighbor_ids The id of each element in the neighbor send buffers.
Expand Down
8 changes: 4 additions & 4 deletions core/src/Cabana_Distributor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ void migrate( const Distributor_t& distributor, const AoSoA_t& src,
\param distributor The distributor to use for the migration.
\param aosoa The AoSoA containing the data to be migrated. Upon input, must
have the same number of elements as the inputs used to construct the
destributor. At output, it will be the same size as th enumber of import
distributor. At output, it will be the same size as th enumber of import
elements on this rank provided by the distributor. Before using this
function, consider reserving enough memory in the data structure so
reallocating is not necessary.
Expand Down Expand Up @@ -446,7 +446,7 @@ void migrate( ExecutionSpace exec_space, const Distributor_t& distributor,
\param distributor The distributor to use for the migration.
\param aosoa The AoSoA containing the data to be migrated. Upon input, must
have the same number of elements as the inputs used to construct the
destributor. At output, it will be the same size as th enumber of import
distributor. At output, it will be the same size as th enumber of import
elements on this rank provided by the distributor. Before using this
function, consider reserving enough memory in the data structure so
reallocating is not necessary.
Expand Down Expand Up @@ -476,7 +476,7 @@ void migrate( const Distributor_t& distributor, AoSoA_t& aosoa,
\param distributor The distributor to use for the migration.
\param src The slice containing the data to be migrated. Must have the same
number of elements as the inputs used to construct the destributor.
number of elements as the inputs used to construct the distributor.
\param dst The slice to which the migrated data will be written. Must be the
same size as the number of imports given by the distributor on this
rank. Call totalNumImport() on the distributor to get this size value.
Expand Down Expand Up @@ -656,7 +656,7 @@ void migrate( ExecutionSpace, const Distributor_t& distributor,
\param distributor The distributor to use for the migration.
\param src The slice containing the data to be migrated. Must have the same
number of elements as the inputs used to construct the destributor.
number of elements as the inputs used to construct the distributor.
\param dst The slice to which the migrated data will be written. Must be the
same size as the number of imports given by the distributor on this
rank. Call totalNumImport() on the distributor to get this size value.
Expand Down
2 changes: 1 addition & 1 deletion core/src/Cabana_HDF5ParticleOutput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ void readTimeStep( HDF5Config h5_config, const std::string& prefix,
// Get the rank of the dataspace.
ndims = H5Sget_simple_extent_ndims( filespace_id );

// Get the extents fo the file dataspace.
// Get the extents of the file dataspace.
H5Sget_simple_extent_dims( filespace_id, dimsf, NULL );

std::vector<int> all_offsets( comm_size );
Expand Down
2 changes: 1 addition & 1 deletion core/src/Cabana_Slice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ class Slice
}

/*!
\brief Assignement operator for different memory spaces for assigning
\brief Assignment operator for different memory spaces for assigning
new memory access traits to the view.
\tparam MAT Memory access type
\param rhs The slice to shallow copy with a potentially different memory
Expand Down
2 changes: 1 addition & 1 deletion core/src/impl/Cabana_TypeTraits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Impl
template <int N>
struct IsPowerOfTwo
{
static_assert( N > 0, "Vector length must be greather than 0" );
static_assert( N > 0, "Vector length must be greater than 0" );
static constexpr bool value = ( ( N & ( N - 1 ) ) == 0 );
};

Expand Down
2 changes: 1 addition & 1 deletion core/unit_test/tstAoSoA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void testAoSoA()
checkDataMembers( aosoa, fval, dval, ival, dim_1, dim_2, dim_3 );

// Now extend the capacity of the container. First make the capacity
// smaller - this wont actually do anything because we never decrease the
// smaller - this won't actually do anything because we never decrease the
// allocation of the container.
aosoa.reserve( 1 );

Expand Down
2 changes: 1 addition & 1 deletion core/unit_test/tstNeighborList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void testVerletListFull()
checkFullNeighborList( nlist, test_data.N2_list_copy,
test_data.num_particle );

// Test rebuild function with explict execution space.
// Test rebuild function with explicit execution space.
nlist.build( TEST_EXECSPACE{}, position, 0, position.size(),
test_data.test_radius, test_data.cell_size_ratio,
test_data.grid_min, test_data.grid_max );
Expand Down
2 changes: 1 addition & 1 deletion core/unit_test/tstSort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ void testBinBySliceDataOnly()
auto bin_size_mirror =
Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), bin_size );

// Check the result of the sort. Make sure nothing moved execpt the
// Check the result of the sort. Make sure nothing moved except the
// binning data.
auto mirror =
Cabana::create_mirror_view_and_copy( Kokkos::HostSpace(), aosoa );
Expand Down
2 changes: 1 addition & 1 deletion example/core_tutorial/01_hello_world/hello_world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
int main( int argc, char* argv[] )
{
/* The Kokkos runtime used by Cabana must be initialized and finalized.
Kokkos::ScopeGuard inializes Kokkos and guarantees it is finalized,
Kokkos::ScopeGuard initializes Kokkos and guarantees it is finalized,
even if the code returns early.
*/
Kokkos::ScopeGuard scope_guard( argc, argv );
Expand Down
2 changes: 1 addition & 1 deletion example/core_tutorial/05_slice/slice_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void sliceExample()
Create a slice over each tuple member in the AoSoA. An integer template
parameter is used to indicate which member to slice. A slice object
simply wraps the data associated with an AoSoA member in a more
conventient accessor structure. A slice therefore has the same memory
convenient accessor structure. A slice therefore has the same memory
space as the AoSoA from which it was derived. Slices may optionally be
assigned a label. This label is not included in the memory tracker
because slices are unmanaged memory but may still be used for diagnostic
Expand Down
6 changes: 3 additions & 3 deletions example/core_tutorial/06_deep_copy/deep_copy_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ void deepCopyExample()
the same memory space as dst_aosoa was created in (in this case if
dst_aosoa is already on the host) we will receive the same dst_aosoa back
- no memory allocations or copies will occur. This is particularly useful
for writing code that will run on both heterogenous and homogenous
architectures where the heterogenous case requires an allocation and a
copy while the homogenous case does not.
for writing code that will run on both heterogeneous and homogeneous
architectures where the heterogeneous case requires an allocation and a
copy while the homogeneous case does not.
*/

/*
Expand Down
4 changes: 2 additions & 2 deletions example/core_tutorial/11_migration/migration_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ void migrationExample()
// Make a new AoSoA. Note that this has the same data types, vector
// length, and memory space as the original aosoa.
//
// Also note how this AoSoA is sized. The distrubutor computes how many
// imported elements each rank will recieve. We discard 10 elements, get
// Also note how this AoSoA is sized. The distributor computes how many
// imported elements each rank will receive. We discard 10 elements, get
// 10 from our neighbor, and keep 80 of our own so this number should be 90.
Cabana::AoSoA<DataTypes, MemorySpace, VectorLength> destination(
"destination", distributor.totalNumImport() );
Expand Down
4 changes: 2 additions & 2 deletions example/grid_tutorial/01_types/types_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ void typesExample()

/*
Related, there are type tags to distinguish local and global indexing:
local indicies are unique only within a given MPI rank, while global
indicies are unique across all MPI ranks. For example, a given node might
local indices are unique only within a given MPI rank, while global
indices are unique across all MPI ranks. For example, a given node might
have a different local index on different MPI ranks if it is a ghost, but
it will always have a unique global index on every MPI rank.
Expand Down
4 changes: 2 additions & 2 deletions example/grid_tutorial/05_index_space/index_space_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void indexSpaceExample()
std::cout << "Size: " << is3.size() << std::endl;

/*
Finally, it is possible to check whether a given set of indicies in within
Finally, it is possible to check whether a given set of indices in within
the range of an index space (in this case false and then true based on the
second indices).
*/
Expand All @@ -106,7 +106,7 @@ void indexSpaceExample()
/*
Index spaces can also have dimensions appended. Using the 3D index space
created above, we create a 4D index space (the minimum input can be
ommitted to start from zero).
omitted to start from zero).
*/
auto is4 = Cabana::Grid::appendDimension( is3, 3, 10 );
std::cout << "\nappended 4D index space:\nExtent: ";
Expand Down
2 changes: 1 addition & 1 deletion example/grid_tutorial/06_local_grid/local_grid_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void localGridExample()
std::cout << "\n" << std::endl;

/*
It is possible to convert between local and global indicies if needed in
It is possible to convert between local and global indices if needed in
the IndexConversion namespace.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void gridParallelExample()
Here we use a lambda function for simplicity, but a functor with or
without tag arguments are also options. Note that the kernel signature
uses the three indicies of the 3D grid. We set every value on the cells in
uses the three indices of the 3D grid. We set every value on the cells in
the grid to 1.
*/
auto array_view = array->view();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ int main( int argc, char* argv[] )
The hypre solver capabilities used by Cabana must be initialized and
finalized. HYPRE_Finalize() finalizes hypre. A call to
HYPRE_Finalize() should not occur before all calls to hypre
capabilites are finished.
capabilities are finished.
*/
HYPRE_Finalize();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void structuredSolverExample()
{ 0, 0, 0 }, { -1, 0, 0 }, { 1, 0, 0 }, { 0, -1, 0 },
{ 0, 1, 0 }, { 0, 0, -1 }, { 0, 0, 1 } };

// Create an array and initialze to zero.
// Create an array and initialize to zero.
auto lhs =
Cabana::Grid::createArray<double, MemorySpace>( "lhs", vector_layout );
Cabana::Grid::ArrayOp::assign( *lhs, 0.0, Cabana::Grid::Own() );
Expand All @@ -109,7 +109,7 @@ void structuredSolverExample()
Cabana::Grid::Dim::K );

// Fill out laplacian entries of reference solver. Entities on the system
// boundary need to be initialzed to zero.
// boundary need to be initialized to zero.
Kokkos::parallel_for(
"fill_ref_entries",
createExecutionPolicy( owned_space, ExecutionSpace() ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ int main( int argc, char* argv[] )
The hypre solver capabilities used by Cabana must be initialized and
finalized. HYPRE_Finalize() finalizes hypre. A call to
HYPRE_Finalize() should not occur before all calls to hypre
capabilites are finished. This call is placed outside the hypre solver
function to ensure the hypre objects are out of scope
capabilities are finished. This call is placed outside the hypre
solver function to ensure the hypre objects are out of scope
*/
HYPRE_Finalize();
}
Expand Down
2 changes: 1 addition & 1 deletion example/grid_tutorial/12_halo/halo_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void gridHaloExample()

/*
Create a halo. Note that this is done with the array data and that no
communication has occured yet. The halo width (within the value
communication has occurred yet. The halo width (within the value
allocated) is also passed, together with options for the type of
communication:
- Node pattern communicates with 26 MPI neighbors in 3D (8 in 2D)
Expand Down
10 changes: 5 additions & 5 deletions example/grid_tutorial/15_interpolation/interpolation_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void interpolationExample()
* particle maps to several grid points), which requires an underlying
* Kokkos::ScatterView for the data being interpolated. Of note, a
* thread-level interface provides methods to perform interpolations for a
* single particle datum to neighboring mesh entitites.
* single particle datum to neighboring mesh entities.
*
* Cabana::Grid also provides a convenience interface for defining
* field-based P2G or G2P operators, by wrapping the thread-level
Expand Down Expand Up @@ -258,7 +258,7 @@ void interpolationExample()
auto scalar_view = scalar_grid_field->view();

// Print out a random grid point before value interpolation.
std::cout << "Invididual grid point at (5, 5):\n\tbefore "
std::cout << "Individual grid point at (5, 5):\n\tbefore "
"p2g::value interpolation: "
<< scalar_view( 5, 5, 0 );

Expand All @@ -282,7 +282,7 @@ void interpolationExample()

// Print out before gradient interpolation.
auto vector_view = vector_grid_field->view();
std::cout << "Invididual grid point at (5, 5):\n\tbefore "
std::cout << "Individual grid point at (5, 5):\n\tbefore "
"p2g::gradient interpolation: <";
std::cout << vector_view( 5, 5, 0 ) << ", " << vector_view( 5, 5, 1 )
<< ">";
Expand All @@ -301,7 +301,7 @@ void interpolationExample()
// Reset the grid to zero and print before divergence interpolation.
Cabana::Grid::ArrayOp::assign( *vector_grid_field, 0.0,
Cabana::Grid::Ghost() );
std::cout << "Invididual grid point at (5, 5):\n\tbefore "
std::cout << "Individual grid point at (5, 5):\n\tbefore "
"p2g::divergence interpolation: <";
std::cout << vector_view( 5, 5, 0 ) << ", " << vector_view( 5, 5, 1 )
<< ">";
Expand All @@ -320,7 +320,7 @@ void interpolationExample()
// Reset the grid to zero and print before vector value interpolation.
Cabana::Grid::ArrayOp::assign( *vector_grid_field, 0.0,
Cabana::Grid::Ghost() );
std::cout << "Invididual grid point at (5, 5, 5):\n\tbefore "
std::cout << "Individual grid point at (5, 5, 5):\n\tbefore "
"p2g::value interpolation: <";
std::cout << vector_view( 5, 5, 0 ) << ", " << vector_view( 5, 5, 1 )
<< ">";
Expand Down
8 changes: 4 additions & 4 deletions grid/src/Cabana_Grid_FastFourierTransform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ class HeffteFastFourierTransform
//---------------------------------------------------------------------------//
// heFFTe creation
//---------------------------------------------------------------------------//
//! Creation function for heFFTe FFT with explict FFT backend.
//! Creation function for heFFTe FFT with explicit FFT backend.
//! \param exec_space Kokkos execution space
//! \param layout FFT entity array
//! \param params FFT parameters
Expand Down Expand Up @@ -681,7 +681,7 @@ auto createHeffteFastFourierTransform(
exec_space, layout, params );
}

//! Creation function for heFFTe FFT with explict FFT backend and default
//! Creation function for heFFTe FFT with explicit FFT backend and default
//! parameters.
//! \param exec_space Kokkos execution space
//! \param layout FFT entity array
Expand Down Expand Up @@ -722,7 +722,7 @@ auto createHeffteFastFourierTransform(
exec_space, layout );
}

//! Creation function for heFFTe FFT with explict FFT backend.
//! Creation function for heFFTe FFT with explicit FFT backend.
//! \param layout FFT entity array
//! \param params FFT parameters
template <class Scalar, class MemorySpace, class BackendType, class EntityType,
Expand Down Expand Up @@ -751,7 +751,7 @@ auto createHeffteFastFourierTransform(
exec_space{}, layout, params );
}

//! Creation function for heFFTe FFT with explict FFT backend and default
//! Creation function for heFFTe FFT with explicit FFT backend and default
//! parameters.
//! \param layout FFT entity array
template <class Scalar, class MemorySpace, class BackendType, class EntityType,
Expand Down
6 changes: 3 additions & 3 deletions grid/src/Cabana_Grid_GlobalMesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class GlobalMesh
return highCorner( dim ) - lowCorner( dim );
}

//! \brief Get the global numer of cells in a given dimension.
//! \brief Get the global number of cells in a given dimension.
//! \param dim Spatial dimension.
int globalNumCell( const std::size_t dim ) const
{
Expand Down Expand Up @@ -358,7 +358,7 @@ class GlobalMesh<NonUniformMesh<Scalar, 3>>
return highCorner( dim ) - lowCorner( dim );
}

//! \brief Get the global numer of cells in a given dimension.
//! \brief Get the global number of cells in a given dimension.
//! \param dim Spatial dimension.
int globalNumCell( const std::size_t dim ) const
{
Expand Down Expand Up @@ -448,7 +448,7 @@ class GlobalMesh<NonUniformMesh<Scalar, 2>>
return highCorner( dim ) - lowCorner( dim );
}

//! \brief Get the global numer of cells in a given dimension.
//! \brief Get the global number of cells in a given dimension.
//! \param dim Spatial dimension.
int globalNumCell( const std::size_t dim ) const
{
Expand Down
2 changes: 1 addition & 1 deletion grid/src/Cabana_Grid_Halo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ class Halo
// The tag we use for sending to each neighbor.
std::vector<int> _send_tags;

// The tag we use for receiveing from each neighbor.
// The tag we use for receiving from each neighbor.
std::vector<int> _receive_tags;

// For each neighbor, send/receive buffers for data we own.
Expand Down
Loading

0 comments on commit 0757378

Please sign in to comment.