# include "psphot.h"

bool psphotSetThreads () {

    psThreadTask *task = NULL;

    task = psThreadTaskAlloc("PSPHOT_GUESS_MODEL", 5);
    task->function = &psphotGuessModel_Threaded;
    psThreadTaskAdd(task);
    psFree(task);

    task = psThreadTaskAlloc("PSPHOT_MAGNITUDES", 9);
    task->function = &psphotMagnitudes_Threaded;
    psThreadTaskAdd(task);
    psFree(task);

    task = psThreadTaskAlloc("PSPHOT_PSF_WEIGHTS", 2);
    task->function = &psphotPSFWeights_Threaded;
    psThreadTaskAdd(task);
    psFree(task);

    task = psThreadTaskAlloc("PSPHOT_APRESID_MAGS", 7);
    task->function = &psphotApResidMags_Threaded;
    psThreadTaskAdd(task);
    psFree(task);

    task = psThreadTaskAlloc("PSPHOT_SOURCE_STATS", 10);
    task->function = &psphotSourceStats_Threaded;
    psThreadTaskAdd(task);
    psFree(task);

    task = psThreadTaskAlloc("PSPHOT_BLEND_FIT", 9);
    task->function = &psphotBlendFit_Threaded;
    psThreadTaskAdd(task);
    psFree(task);

    return true;
}
