~ubuntu-branches/ubuntu/wily/libzn-poly/wily

« back to all changes in this revision

Viewing changes to prof_main.c

  • Committer: Bazaar Package Importer
  • Author(s): Tim Abbott
  • Date: 2008-05-27 20:23:43 UTC
  • Revision ID: james.westby@ubuntu.com-20080527202343-ufcb3fwj2as0edoz
Tags: upstream-0.8
ImportĀ upstreamĀ versionĀ 0.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   prof_main.c:  main() routine for profiling programs
 
3
   
 
4
   Copyright (C) 2007, 2008, David Harvey
 
5
   
 
6
   This file is part of the zn_poly library (version 0.8).
 
7
   
 
8
   This program is free software: you can redistribute it and/or modify
 
9
   it under the terms of the GNU General Public License as published by
 
10
   the Free Software Foundation, either version 2 of the License, or
 
11
   (at your option) version 3 of the License.
 
12
 
 
13
   This program is distributed in the hope that it will be useful,
 
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
   GNU General Public License for more details.
 
17
 
 
18
   You should have received a copy of the GNU General Public License
 
19
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
 
 
21
*/
 
22
 
 
23
#include "support.h"
 
24
#include "profiler.h"
 
25
 
 
26
 
 
27
/*
 
28
   Profiling programs link against this file, and implement a function
 
29
   void prof_main(argc, argv)
 
30
*/
 
31
 
 
32
int main(int argc, char* argv[])
 
33
{
 
34
   calibrate_cycle_scale_factor();
 
35
 
 
36
#if !ZNP_HAVE_CYCLE_COUNTER
 
37
   printf("Cannot run profiles; no cycle counter on this system!\n");
 
38
#else
 
39
   gmp_randinit_default(randstate);
 
40
   prof_main(argc, argv);
 
41
   gmp_randclear(randstate);
 
42
#endif
 
43
   
 
44
   return 0;
 
45
}
 
46
 
 
47
 
 
48
// end of file ****************************************************************