답안 #1087908

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1087908 2024-09-13T12:15:58 Z crafticat 정렬하기 (IOI15_sorting) C++17
컴파일 오류
0 ms 0 KB
#include <iostream>

#ifdef __SSE2__
#include <emmintrin.h>
#else
#warning SSE2 support is not available. Code will not compile
#endif


int main(int argc, char **argv)
{
    __m128 a = _mm_set_ps(4.0, 3.0, 2.0, 1.0);
    __m128 b = _mm_set_ps(8.0, 7.0, 6.0, 5.0);

    __m128 c = _mm_add_ps(a, b);

    float d[4];
    _mm_storeu_ps(d, c);

    std::cout << "result equals " << d[0] << "," << d[1]
              << "," << d[2] << "," << d[3] << std::endl;

    return 0;
}

Compilation message

sorting.cpp: In function 'int main(int, char**)':
sorting.cpp:10:14: warning: unused parameter 'argc' [-Wunused-parameter]
   10 | int main(int argc, char **argv)
      |          ~~~~^~~~
sorting.cpp:10:27: warning: unused parameter 'argv' [-Wunused-parameter]
   10 | int main(int argc, char **argv)
      |                    ~~~~~~~^~~~
/usr/bin/ld: /tmp/ccdacGzD.o: in function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'; /tmp/cckpVS5C.o:sorting.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccdacGzD.o: in function `main':
grader.c:(.text.startup+0x4eb): undefined reference to `findSwapPairs(int, int*, int, int*, int*, int*, int*)'
collect2: error: ld returned 1 exit status