Ejemplo n.º 1
0
            bool create_area(osmium::memory::Buffer& out_buffer, const osmium::Relation& relation, const std::vector<const osmium::Way*>& members) {
                set_num_members(members.size());
                osmium::builder::AreaBuilder builder{out_buffer};
                builder.initialize_from_object(relation);

                const bool area_okay = create_rings();
                if (area_okay || config().create_empty_areas) {
                    if (config().keep_type_tag) {
                        builder.add_item(relation.tags());
                    } else {
                        copy_tags_without_type(builder, relation.tags());
                    }
                }
                if (area_okay) {
                    add_rings_to_area(builder);
                }

                if (report_ways()) {
                    for (const osmium::Way* way : members) {
                        config().problem_reporter->report_way(*way);
                    }
                }

                return area_okay || config().create_empty_areas;
            }
Ejemplo n.º 2
0
Archivo: main.c Proyecto: izard/RTBench
int main_503_1()
{
	*baremetal_rings_allocated = 0;
	create_rings();
	*baremetal_rings_pointers++ = app1;
	*baremetal_rings_pointers++ = app2;
	*baremetal_rings_pointers++ = app3;
	*baremetal_rings_pointers++ = app4;
	*baremetal_rings_pointers++ = out1;
	*baremetal_rings_pointers++ = out2;
	int arg1 = 0;
	app_func((void*)&arg1);
}
Ejemplo n.º 3
0
            /**
             * Assemble an area from the given way.
             *
             * The resulting area is put into the out_buffer.
             *
             * @returns false if there was some kind of error building the
             *          area, true otherwise.
             */
            bool operator()(const osmium::Way& way, osmium::memory::Buffer& out_buffer) {
                segment_list().extract_segments_from_way(config().problem_reporter, stats().duplicate_nodes, way);

                if (!create_rings()) {
                    return false;
                }

                {
                    osmium::builder::AreaBuilder builder{out_buffer};
                    builder.initialize_from_object(way);
                    add_rings_to_area(builder);
                }
                out_buffer.commit();

                return true;
            }
Ejemplo n.º 4
0
Archivo: main.c Proyecto: izard/RTBench
int main()
{
	create_rings();
	// start app thread
	pthread_t app_thread1, app_thread2;
	int arg1 = 0;
	pthread_create(&app_thread1, NULL, app_func, (void*)&arg1);

	// start io 2x threads
	pthread_t io_thread1, io_thread2;
	int arg3 = 0, arg4 = 1;
	pthread_create(&io_thread1, NULL, io_func, (void*)&arg3);
	pthread_create(&io_thread2, NULL, io_func, (void*)&arg4);

	// wait until senders are out of packets
	pthread_join(app_thread1, NULL);
}
Ejemplo n.º 5
0
            bool create_area(osmium::memory::Buffer& out_buffer, const osmium::Way& way) {
                osmium::builder::AreaBuilder builder{out_buffer};
                builder.initialize_from_object(way);

                const bool area_okay = create_rings();
                if (area_okay || config().create_empty_areas) {
                    builder.add_item(way.tags());
                }
                if (area_okay) {
                    add_rings_to_area(builder);
                }

                if (report_ways()) {
                    config().problem_reporter->report_way(way);
                }

                return area_okay || config().create_empty_areas;
            }