Cycles: oneAPI: Cleanup: Change packed_float3 to float3

float3 is already packed in oneAPI.
No functional change is expected.
This commit is contained in:
Xavier Hallade
2024-06-04 18:56:52 +02:00
parent fac32e9647
commit a7171e0391
4 changed files with 8 additions and 7 deletions

View File

@@ -158,7 +158,8 @@ ccl_device_inline float3 operator/=(float3 &a, float f)
return a = a * invf;
}
# if !(defined(__KERNEL_METAL__) || defined(__KERNEL_CUDA__) || defined(__KERNEL_HIP__))
# if !(defined(__KERNEL_METAL__) || defined(__KERNEL_CUDA__) || defined(__KERNEL_HIP__) || \
defined(__KERNEL_ONEAPI__))
ccl_device_inline packed_float3 operator*=(packed_float3 &a, const float3 b)
{
a = float3(a) * b;

View File

@@ -63,8 +63,8 @@ ccl_device_inline void print_float3(ccl_private const char *label, const float3
* CPU SIMD instructions can be used. */
#if defined(__KERNEL_METAL__)
/* Metal has native packed_float3. */
#elif defined(__KERNEL_CUDA__) || defined(__KERNEL_HIP__)
/* CUDA and HIP float3 are already packed. */
#elif defined(__KERNEL_CUDA__) || defined(__KERNEL_HIP__) || defined(__KERNEL_ONEAPI__)
/* CUDA, HIP and oneAPI float3 are already packed. */
typedef float3 packed_float3;
#else
struct packed_float3 {

View File

@@ -53,8 +53,8 @@ ccl_device_inline void print_int3(ccl_private const char *label, const int3 a);
#if defined(__KERNEL_METAL__)
/* Metal has native packed_int3. */
#elif defined(__KERNEL_CUDA__)
/* CUDA int3 is already packed. */
#elif defined(__KERNEL_CUDA__) || defined(__KERNEL_ONEAPI__)
/* CUDA and oneAPI int3 are already packed. */
typedef int3 packed_int3;
#else
/* HIP int3 is not packed (https://github.com/ROCm-Developer-Tools/HIP/issues/706). */

View File

@@ -25,8 +25,8 @@ ccl_device_inline uint3 make_uint3(uint x, uint y, uint z);
#if defined(__KERNEL_METAL__)
/* Metal has native packed_float3. */
#elif defined(__KERNEL_CUDA__)
/* CUDA uint3 is already packed. */
#elif defined(__KERNEL_CUDA__) || defined(__KERNEL_ONEAPI__)
/* CUDA and oneAPI uint3 are already packed. */
typedef uint3 packed_uint3;
#else
/* HIP uint3 is not packed (https://github.com/ROCm-Developer-Tools/HIP/issues/706). */