示例#1
0
        def udt(output):
            global_id = hsa.get_global_id(0)
            global_size = hsa.get_global_size(0)
            local_id = hsa.get_local_id(0)
            group_id = hsa.get_group_id(0)
            num_groups = hsa.get_num_groups(0)
            workdim = hsa.get_work_dim()
            local_size = hsa.get_local_size(0)

            output[0, group_id, local_id] = global_id
            output[1, group_id, local_id] = global_size
            output[2, group_id, local_id] = local_id
            output[3, group_id, local_id] = local_size
            output[4, group_id, local_id] = group_id
            output[5, group_id, local_id] = num_groups
            output[6, group_id, local_id] = workdim
示例#2
0
        def udt(output):
            global_id = hsa.get_global_id(0)
            global_size = hsa.get_global_size(0)
            local_id = hsa.get_local_id(0)
            group_id = hsa.get_group_id(0)
            num_groups = hsa.get_num_groups(0)
            workdim = hsa.get_work_dim()
            local_size = hsa.get_local_size(0)

            output[0, group_id, local_id] = global_id
            output[1, group_id, local_id] = global_size
            output[2, group_id, local_id] = local_id
            output[3, group_id, local_id] = local_size
            output[4, group_id, local_id] = group_id
            output[5, group_id, local_id] = num_groups
            output[6, group_id, local_id] = workdim
示例#3
0
 def udt2(output):
     g0 = hsa.get_global_id(0)
     g1 = hsa.get_global_id(1)
     output[g0, g1] = hsa.get_work_dim()
示例#4
0
 def udt(output):
     global_id = hsa.get_global_id(0)
     workdim = hsa.get_work_dim()
     output[global_id] = workdim