| 80 | }; |
| 81 | |
| 82 | int main() |
| 83 | { |
| 84 | Timer scoped_timer_main_fn("main-function"); |
| 85 | |
| 86 | MioMesh srcMesh = { |
| 87 | nullptr, // pVertices |
| 88 | nullptr, // pNormals |
| 89 | nullptr, // pTexCoords |
| 90 | nullptr, // pFaceSizes |
| 91 | nullptr, // pFaceVertexIndices |
| 92 | nullptr, // pFaceVertexTexCoordIndices |
| 93 | nullptr, // pFaceVertexNormalIndices |
| 94 | 0, // numVertices |
| 95 | 0, // numNormals |
| 96 | 0, // numTexCoords |
| 97 | 0, // numFaces |
| 98 | }; |
| 99 | |
| 100 | MioMesh cutMesh = srcMesh; |
| 101 | |
| 102 | McResult status = MC_NO_ERROR; |
| 103 | |
| 104 | std::vector<McContext> contexts_array; |
| 105 | |
| 106 | { |
| 107 | Timer scoped_timer("init-function"); |
| 108 | |
| 109 | // |
| 110 | // read-in the source-mesh from file |
| 111 | // |
| 112 | |
| 113 | mioReadOFF(DATA_DIR "/source-mesh.off", |
| 114 | &srcMesh.pVertices, |
| 115 | &srcMesh.pFaceVertexIndices, |
| 116 | &srcMesh.pFaceSizes, |
| 117 | &srcMesh.numVertices, |
| 118 | &srcMesh.numFaces); |
| 119 | |
| 120 | // |
| 121 | // read-in the cut-mesh from file |
| 122 | // |
| 123 | |
| 124 | mioReadOFF(DATA_DIR "/cut-mesh.off", |
| 125 | &cutMesh.pVertices, |
| 126 | &cutMesh.pFaceVertexIndices, |
| 127 | &cutMesh.pFaceSizes, |
| 128 | &cutMesh.numVertices, |
| 129 | &cutMesh.numFaces); |
| 130 | |
| 131 | printf("\n>> Create MCUT contexts\n"); |
| 132 | |
| 133 | const McUint32 num_system_threads = std::thread::hardware_concurrency(); |
| 134 | const McUint32 num_contexts_to_create = num_system_threads / 2; // since we are using "MC_OUT_OF_ORDER_EXEC_MODE_ENABLE" |
| 135 | |
| 136 | contexts_array.resize(num_contexts_to_create); |
| 137 | |
| 138 | for (McUint32 i = 0; i < num_contexts_to_create; ++i) { |
| 139 |
nothing calls this directly
no test coverage detected