Skip to content

Commit

Permalink
small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jcosborn committed Dec 18, 2024
1 parent 94a0c38 commit 31a28bd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion include/kernels/field_strength_tensor.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ namespace quda
// 3*18 + 12*198 = 54 + 2376 = 2430
{
F -= conj(F); // 18 real subtractions + one matrix conjugation
F *= static_cast<typename Ftor::Arg::Float>(0.125); // 18 real multiplications
F *= static_cast<typename Arg::Float>(0.125); // 18 real multiplications
// 36 floating point operations here
}

Expand Down
4 changes: 2 additions & 2 deletions include/targets/cuda/shared_memory_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace quda
/**
@brief Constructor for SharedMemory object.
*/
HostDevice constexpr SharedMemory() : data(cache(get_offset(target::block_dim()))) { }
constexpr SharedMemory() : data(cache(get_offset(target::block_dim()))) { }

/**
@brief Constructor for SharedMemory object.
Expand All @@ -85,7 +85,7 @@ namespace quda
/**
@brief Return this SharedMemory object.
*/
HostDevice constexpr auto sharedMem() const { return *this; }
constexpr auto sharedMem() const { return *this; }

/**
@brief Subscripting operator returning a reference to element.
Expand Down
9 changes: 4 additions & 5 deletions include/targets/hip/shared_memory_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ namespace quda
/**
@brief Byte offset for this shared memory object.
*/
template <typename ...Arg>
static constexpr unsigned int get_offset(dim3 block, Arg &...arg)
static constexpr unsigned int get_offset(dim3 block)
{
unsigned int o = 0;
if constexpr (!std::is_same_v<O, void>) { o = O::shared_mem_size(block, arg...); }
if constexpr (!std::is_same_v<O, void>) { o = O::shared_mem_size(block); }
return o;
}

Expand All @@ -73,7 +72,7 @@ namespace quda
/**
@brief Constructor for SharedMemory object.
*/
HostDevice constexpr SharedMemory() : data(cache(get_offset(target::block_dim()))) { }
__device__ __host__ constexpr SharedMemory() : data(cache(get_offset(target::block_dim()))) { }

/**
@brief Constructor for SharedMemory object.
Expand All @@ -86,7 +85,7 @@ namespace quda
/**
@brief Return this SharedMemory object.
*/
constexpr auto sharedMem() const { return *this; }
__device__ __host__ constexpr auto sharedMem() const { return *this; }

/**
@brief Subscripting operator returning a reference to element.
Expand Down
1 change: 0 additions & 1 deletion include/targets/hip/tunable_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <kernel.h>
#include <kernel_ops_target.h>
#include <quda_hip_api.h>
#include <kernel_ops_target.h>

namespace quda
{
Expand Down

0 comments on commit 31a28bd

Please sign in to comment.