/normxcorr/trunk

To get this branch, use:
bzr branch http://suren.me/webbzr/normxcorr/trunk

« back to all changes in this revision

Viewing changes to dict_hw/src/hw_sched.c

  • Committer: Suren A. Chilingaryan
  • Date: 2010-08-08 13:41:04 UTC
  • Revision ID: csa@dside.dyndns.org-20100808134104-w7l3e5f4d62ygi5c
Fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
    free(ctx);
128
128
}
129
129
 
 
130
int hw_sched_limit_num_threads(HWSched ctx, int count) {
 
131
    ctx->n_threads_actual = count;
 
132
    return 0;
 
133
}
 
134
 
 
135
 
130
136
int hw_sched_set_sequential_mode(HWSched ctx, int *n_blocks, int *cur_block) {
131
137
    ctx->mode = HW_SCHED_MODE_SEQUENTIAL;
132
138
    ctx->n_blocks = n_blocks;
138
144
int hw_sched_get_chunk(HWSched ctx, int thread_id) {
139
145
    int block;
140
146
 
 
147
    if ((ctx->n_threads_actual)&&(thread_id >= ctx->n_threads_actual)) return -1;
 
148
 
141
149
    switch (ctx->mode) {
142
150
        case HW_SCHED_MODE_PREALLOCATED:
143
151
            if (ctx->thread[thread_id]->status == HW_THREAD_STATUS_IDLE) {