Browse Source

Merge pull request #158 from motoya0118/main

Fixed an issue where compiler_cmd was undefined.
pull/178/head
Ed Donner 3 months ago committed by GitHub
parent
commit
e6d8f82f86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      week4/day4.ipynb

3
week4/day4.ipynb

@ -480,8 +480,9 @@
"source": [
"def execute_cpp(code):\n",
" write_output(code)\n",
" compiler_cmd = [\"clang++\", \"-O3\", \"-std=c++17\", \"-march=armv8.3-a\", \"-o\", \"optimized\", \"optimized.cpp\"]\n",
" try:\n",
" compile_result = subprocess.run(compiler_cmd[2], check=True, text=True, capture_output=True)\n",
" compile_result = subprocess.run(compiler_cmd, check=True, text=True, capture_output=True)\n",
" run_cmd = [\"./optimized\"]\n",
" run_result = subprocess.run(run_cmd, check=True, text=True, capture_output=True)\n",
" return run_result.stdout\n",

Loading…
Cancel
Save