Line data Source code
1 : #include "fd_accdb_topo.h" 2 : #include "../flamenco/accdb/fd_accdb_impl_v1.h" 3 : #include "../flamenco/accdb/fd_accdb_impl_v2.h" 4 : #include "../util/pod/fd_pod.h" 5 : 6 : void 7 : fd_accdb_init_from_topo( fd_accdb_user_t * accdb, 8 : fd_topo_t const * topo, 9 0 : fd_topo_tile_t const * tile ) { 10 0 : ulong funk_obj_id; 11 0 : FD_TEST( (funk_obj_id = fd_pod_query_ulong( topo->props, "funk", ULONG_MAX ))!=ULONG_MAX ); 12 0 : fd_topo_obj_t const * vinyl_data = fd_topo_find_tile_obj( topo, tile, "vinyl_data" ); 13 0 : if( !vinyl_data ) { 14 0 : FD_TEST( fd_accdb_user_v1_init( accdb, fd_topo_obj_laddr( topo, funk_obj_id ) ) ); 15 0 : } else { 16 0 : fd_topo_obj_t const * vinyl_rq = fd_topo_find_tile_obj( topo, tile, "vinyl_rq" ); 17 0 : fd_topo_obj_t const * vinyl_req_pool = fd_topo_find_tile_obj( topo, tile, "vinyl_rpool" ); 18 0 : FD_TEST( fd_accdb_user_v2_init( accdb, 19 0 : fd_topo_obj_laddr( topo, funk_obj_id ), 20 0 : fd_topo_obj_laddr( topo, vinyl_rq->id ), 21 0 : topo->workspaces[ vinyl_data->wksp_id ].wksp, 22 0 : fd_topo_obj_laddr( topo, vinyl_req_pool->id ), 23 0 : vinyl_rq->id ) ); 24 0 : } 25 0 : }