Skip to content

Commit

Permalink
default cache line size
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan committed Aug 20, 2024
1 parent a645d68 commit a623988
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion inc/mkn/avx/lazy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <new>
#include <tuple>
#include <vector>
#include <cstdint>

namespace mkn::avx
{
Expand Down Expand Up @@ -225,7 +226,11 @@ struct LazyEvaluator
}
};

auto const cl_size = std::hardware_destructive_interference_size;
#ifdef __cpp_lib_hardware_interference_size
std::size_t const cl_size = std::hardware_destructive_interference_size;
#else
std::size_t constexpr cl_size = 64;
#endif

std::size_t const batch = cl_size / sizeof(T) / N;

Expand Down

0 comments on commit a623988

Please sign in to comment.