|
16 | 16 |
|
17 | 17 | //================================================================================ |
18 | 18 | // this file has been auto-generated, do not modify its contents! |
19 | | -// date: 2023-09-28 12:12:55.542179 |
20 | | -// git hash: 0ae5853b782118d9842541588429b4aec7ff186a |
| 19 | +// date: 2023-10-06 16:02:20.461619 |
| 20 | +// git hash: d578b7a87ead79baf78e181e8fbe14c03ea3f9a6 |
21 | 21 | //================================================================================ |
22 | 22 |
|
23 | 23 | #ifndef KERNEL_FLOAT_MACROS_H |
@@ -365,126 +365,42 @@ struct alignas(Alignment) aligned_array { |
365 | 365 | T items_[N] = {}; |
366 | 366 | }; |
367 | 367 |
|
368 | | -template<typename T, size_t Alignment> |
369 | | -struct aligned_array<T, 0, Alignment> { |
370 | | - KERNEL_FLOAT_INLINE |
371 | | - T* data() { |
372 | | - while (true) |
373 | | - ; |
374 | | - } |
375 | | - |
376 | | - KERNEL_FLOAT_INLINE |
377 | | - const T* data() const { |
378 | | - while (true) |
379 | | - ; |
380 | | - } |
381 | | -}; |
382 | | - |
383 | 368 | template<typename T, size_t Alignment> |
384 | 369 | struct alignas(Alignment) aligned_array<T, 1, Alignment> { |
385 | 370 | KERNEL_FLOAT_INLINE |
386 | | - aligned_array(T value = {}) : x(value) {} |
| 371 | + aligned_array(T item = {}) : item_(item) {} |
387 | 372 |
|
388 | 373 | KERNEL_FLOAT_INLINE |
389 | 374 | operator T() const { |
390 | | - return x; |
| 375 | + return item_; |
391 | 376 | } |
392 | 377 |
|
393 | 378 | KERNEL_FLOAT_INLINE |
394 | 379 | T* data() { |
395 | | - return &x; |
| 380 | + return &item_; |
396 | 381 | } |
397 | 382 |
|
398 | 383 | KERNEL_FLOAT_INLINE |
399 | 384 | const T* data() const { |
400 | | - return &x; |
| 385 | + return &item_; |
401 | 386 | } |
402 | 387 |
|
403 | | - T x; |
| 388 | + T item_ = {}; |
404 | 389 | }; |
405 | 390 |
|
406 | 391 | template<typename T, size_t Alignment> |
407 | | -struct alignas(Alignment) aligned_array<T, 2, Alignment> { |
408 | | - KERNEL_FLOAT_INLINE |
409 | | - aligned_array(T x, T y) : x(x), y(y) {} |
410 | | - |
411 | | - KERNEL_FLOAT_INLINE |
412 | | - aligned_array() : aligned_array(T {}, T {}) {} |
413 | | - |
414 | | - KERNEL_FLOAT_INLINE |
415 | | - T* data() { |
416 | | - return items; |
417 | | - } |
418 | | - |
419 | | - KERNEL_FLOAT_INLINE |
420 | | - const T* data() const { |
421 | | - return items; |
422 | | - } |
423 | | - |
424 | | - union { |
425 | | - T items[2]; |
426 | | - struct { |
427 | | - T x; |
428 | | - T y; |
429 | | - }; |
430 | | - }; |
431 | | -}; |
432 | | - |
433 | | -template<typename T, size_t Alignment> |
434 | | -struct alignas(Alignment) aligned_array<T, 3, Alignment> { |
435 | | - KERNEL_FLOAT_INLINE |
436 | | - aligned_array(T x, T y, T z) : x(x), y(y), z(z) {} |
437 | | - |
438 | | - KERNEL_FLOAT_INLINE |
439 | | - aligned_array() : aligned_array(T {}, T {}, T {}) {} |
440 | | - |
441 | | - KERNEL_FLOAT_INLINE |
442 | | - T* data() { |
443 | | - return items; |
444 | | - } |
445 | | - |
446 | | - KERNEL_FLOAT_INLINE |
447 | | - const T* data() const { |
448 | | - return items; |
449 | | - } |
450 | | - |
451 | | - union { |
452 | | - T items[3]; |
453 | | - struct { |
454 | | - T x; |
455 | | - T y; |
456 | | - T z; |
457 | | - }; |
458 | | - }; |
459 | | -}; |
460 | | - |
461 | | -template<typename T, size_t Alignment> |
462 | | -struct alignas(Alignment) aligned_array<T, 4, Alignment> { |
463 | | - KERNEL_FLOAT_INLINE |
464 | | - aligned_array(T x, T y, T z, T w) : x(x), y(y), z(z), w(w) {} |
465 | | - |
466 | | - KERNEL_FLOAT_INLINE |
467 | | - aligned_array() : aligned_array(T {}, T {}, T {}, T {}) {} |
468 | | - |
| 392 | +struct aligned_array<T, 0, Alignment> { |
469 | 393 | KERNEL_FLOAT_INLINE |
470 | 394 | T* data() { |
471 | | - return items; |
| 395 | + while (true) |
| 396 | + ; |
472 | 397 | } |
473 | 398 |
|
474 | 399 | KERNEL_FLOAT_INLINE |
475 | 400 | const T* data() const { |
476 | | - return items; |
| 401 | + while (true) |
| 402 | + ; |
477 | 403 | } |
478 | | - |
479 | | - union { |
480 | | - T items[4]; |
481 | | - struct { |
482 | | - T x; |
483 | | - T y; |
484 | | - T z; |
485 | | - T w; |
486 | | - }; |
487 | | - }; |
488 | 404 | }; |
489 | 405 |
|
490 | 406 | KERNEL_FLOAT_INLINE |
|
0 commit comments