| 1 | /* |
| 2 | Copyright (c) 2005-2019 Intel Corporation |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | // Message based key matching is a preview feature |
| 18 | #define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1 |
| 19 | |
| 20 | // This preview feature depends on |
| 21 | // TBB_PREVIEW_FLOW_GRAPH_FEATURES macro, and should not accidentally be dependent on |
| 22 | // this deprecated feature |
| 23 | #define 0 |
| 24 | |
| 25 | #include "test_join_node.h" |
| 26 | |
| 27 | int TestMain() { |
| 28 | #if __TBB_USE_TBB_TUPLE |
| 29 | REMARK(" Using TBB tuple\n" ); |
| 30 | #else |
| 31 | REMARK(" Using platform tuple\n" ); |
| 32 | #endif |
| 33 | |
| 34 | #if !__TBB_MIC_OFFLOAD_TEST_COMPILATION_BROKEN |
| 35 | generate_test<serial_test, tbb::flow::tuple<MyMessageKeyWithBrokenKey<int, double>, MyMessageKeyWithoutKey<int, float> >, message_based_key_matching<int> >::do_test(); |
| 36 | generate_test<serial_test, tbb::flow::tuple<MyMessageKeyWithoutKeyMethod<std::string, double>, MyMessageKeyWithBrokenKey<std::string, float> >, message_based_key_matching<std::string> >::do_test(); |
| 37 | #if MAX_TUPLE_TEST_SIZE >= 3 |
| 38 | generate_test<serial_test, tbb::flow::tuple<MyMessageKeyWithoutKey<std::string, double>, MyMessageKeyWithoutKeyMethod<std::string, float>, MyMessageKeyWithBrokenKey<std::string, int> >, message_based_key_matching<std::string&> >::do_test(); |
| 39 | #endif |
| 40 | #if MAX_TUPLE_TEST_SIZE >= 7 |
| 41 | generate_test<serial_test, tbb::flow::tuple< |
| 42 | MyMessageKeyWithoutKey<std::string, double>, |
| 43 | MyMessageKeyWithoutKeyMethod<std::string, int>, |
| 44 | MyMessageKeyWithBrokenKey<std::string, int>, |
| 45 | MyMessageKeyWithoutKey<std::string, size_t>, |
| 46 | MyMessageKeyWithoutKeyMethod<std::string, int>, |
| 47 | MyMessageKeyWithBrokenKey<std::string, short>, |
| 48 | MyMessageKeyWithoutKey<std::string, threebyte> |
| 49 | >, message_based_key_matching<std::string&> >::do_test(); |
| 50 | #endif |
| 51 | |
| 52 | generate_test<parallel_test, tbb::flow::tuple<MyMessageKeyWithBrokenKey<int, double>, MyMessageKeyWithoutKey<int, float> >, message_based_key_matching<int> >::do_test(); |
| 53 | generate_test<parallel_test, tbb::flow::tuple<MyMessageKeyWithoutKeyMethod<int, double>, MyMessageKeyWithBrokenKey<int, float> >, message_based_key_matching<int&> >::do_test(); |
| 54 | generate_test<parallel_test, tbb::flow::tuple<MyMessageKeyWithoutKey<std::string, double>, MyMessageKeyWithoutKeyMethod<std::string, float> >, message_based_key_matching<std::string&> >::do_test(); |
| 55 | |
| 56 | #if MAX_TUPLE_TEST_SIZE >= 10 |
| 57 | generate_test<parallel_test, tbb::flow::tuple< |
| 58 | MyMessageKeyWithoutKeyMethod<std::string, double>, |
| 59 | MyMessageKeyWithBrokenKey<std::string, int>, |
| 60 | MyMessageKeyWithoutKey<std::string, int>, |
| 61 | MyMessageKeyWithoutKeyMethod<std::string, size_t>, |
| 62 | MyMessageKeyWithBrokenKey<std::string, int>, |
| 63 | MyMessageKeyWithoutKeyMethod<std::string, short>, |
| 64 | MyMessageKeyWithoutKeyMethod<std::string, threebyte>, |
| 65 | MyMessageKeyWithBrokenKey<std::string, int>, |
| 66 | MyMessageKeyWithoutKeyMethod<std::string, threebyte>, |
| 67 | MyMessageKeyWithBrokenKey<std::string, size_t> |
| 68 | >, message_based_key_matching<std::string&> >::do_test(); |
| 69 | #endif |
| 70 | #endif /* __TBB_MIC_OFFLOAD_TEST_COMPILATION_BROKEN */ |
| 71 | |
| 72 | generate_test<serial_test, tbb::flow::tuple<MyMessageKeyWithBrokenKey<int, double>, MyMessageKeyWithoutKey<int, float> >, message_based_key_matching<int> >::do_test(); |
| 73 | generate_test<serial_test, tbb::flow::tuple<MyMessageKeyWithoutKeyMethod<std::string, double>, MyMessageKeyWithBrokenKey<std::string, float> >, message_based_key_matching<std::string> >::do_test(); |
| 74 | |
| 75 | return Harness::Done; |
| 76 | } |
| 77 | |