File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,19 @@ class XCppTests(jupyter_kernel_test.KernelTests):
131
131
'mime' : 'image/png'
132
132
}
133
133
]
134
- code_omp = '#include <omp.h>\n #include <iostream>\n #include <clang/Interpreter/CppInterOp.h>\n \n Cpp::LoadLibrary("libomp");int max_threads = omp_get_max_threads();omp_set_thread_num(max_threads);#pragma omp parallel \\ \n { \n if(omp_get_thread_num()==2) {\n std::cerr<<omp_get_thread_num()<<std::endl;}\n }\n '
134
+ code_omp = """
135
+ #include <omp.h>
136
+ #include <iostream>
137
+ #include <clang/Interpreter/CppInterOp.h>
138
+ Cpp::LoadLibrary("libomp");
139
+ int max_threads = omp_get_max_threads();
140
+ omp_set_thread_num(max_threads);
141
+ #pragma omp parallel
142
+ {
143
+ if(omp_get_thread_num()==2) {
144
+ std::cerr<<omp_get_thread_num()<<std::endl;
145
+ }
146
+ }"""
135
147
def test_xcpp_omp (self ):
136
148
self .flush_channels ()
137
149
reply , output_msgs = self .execute_helper (code = self .code_omp ,timeout = 1 )
You can’t perform that action at this time.
0 commit comments