<div dir="ltr"><div dir="ltr">Hello All,<div>I have observed that unpacking variadic templates inside the target region is extremely slow compared to manually writing member functions for each case.</div><div><br><div>I have written a test-case that is attached to this email.</div></div><div>In the test case there are 2 classes for multi-dimensional arrays : </div><div>1. Class specialized for 2D arrays (Array2D)</div><div>2. Class that accepts a parameter pack and can hence be used to create generic MD arrays of any reasonable number of dimensions (ArrayMD). </div><div><br></div><div>I observe that using a 2D array created with the ArrayMD class is ~50x slower when it accesses it's elements inside the target compared to creating the same array using Array2D class.</div><div><br></div><div>Clang-version = LLVM/10 </div><div><br></div><div>There is an associated makefile for the clang compiler that accepts the following parameters : </div><div>make (sequential)</div><div>make OPENMP=y (OpenMP3.0)</div><div>make OPENMP_TARGET=y (OpenMP4.5)</div><div>make OPENMP_TARGET=y VD=y (Use the ArrayMD class to create the 2D array).</div><div><br></div><div>Can someone take a look at this test-case.</div><div><br></div><div><br></div><div>Regards,</div><div>Rahul. </div></div></div>