<commit_before>/* This file performs the following test: start, stop and timer functionality for derived events

   - It tests the derived metric FLOPS using the following two counters.
     They are counted in the default counting domain and default
     granularity, depending on the platform. Usually this is 
     the user domain (PAPI_DOM_USER) and thread context (PAPI_GRN_THR).
     + PAPI_FP_INS
     + PAPI_TOT_CYC
   - Get us.
   - Start counters
   - Do flops
   - Stop and read counters
   - Get us.
*/

#include "papi_test.h"

extern int TESTS_QUIET; /* Declared in test_utils.c */

int main(int argc, char **argv) 
{
  int retval, num_tests = 2, tmp;
  int EventSet1;
  int EventSet2;
  int mask1 = 0x5; /* FP_INS and TOT_CYC */
  int mask2 = 0x8; /* FLOPS */
  int num_events1;
  int num_events2;
  long_long **values;
  int clockrate;
  double test_flops;


  tests_quiet(argc, argv); /* Set TESTS_QUIET variable */

  retval = PAPI_library_init(PAPI_VER_CURRENT);
  if ( retval != PAPI_VER_CURRENT)  test_fail(__FILE__, __LINE__, "PAPI_library_init", retval);

  if ( !TESTS_QUIET ) {
	retval = PAPI_set_debug(PAPI_VERB_ECONT);
	if (retval != PAPI_OK) test_fail(__FILE__, __LINE__, "PAPI_set_debug", retval);
  }

  /* gotta count flops to run this test */
  if ((retval = PAPI_query_event(PAPI_FP_INS)) == PAPI_OK)
	test_skip(__FILE__, __LINE__, "PAPI_query_event", retval);

  EventSet1 = add_test_events(&num_events1,&mask1);
  EventSet2 = add_test_events(&num_events2,&mask2);<commit_msg>Syntax error.<commit_after>/* This file performs the following test: start, stop and timer functionality for derived events

   - It tests the derived metric FLOPS using the following two counters.
     They are counted in the default counting domain and default
     granularity, depending on the platform. Usually this is 
     the user domain (PAPI_DOM_USER) and thread context (PAPI_GRN_THR).
     + PAPI_FP_INS
     + PAPI_TOT_CYC
   - Get us.
   - Start counters
   - Do flops
   - Stop and read counters
   - Get us.
*/

#include "papi_test.h"

extern int TESTS_QUIET; /* Declared in test_utils.c */

int main(int argc, char **argv) 
{
  int retval, num_tests = 2, tmp;
  int EventSet1;
  int EventSet2;
  int mask1 = 0x5; /* FP_INS and TOT_CYC */
  int mask2 = 0x8; /* FLOPS */
  int num_events1;
  int num_events2;
  long_long **values;
  int clockrate;
  double test_flops;


  tests_quiet(argc, argv); /* Set TESTS_QUIET variable */

  retval = PAPI_library_init(PAPI_VER_CURRENT);
  if ( retval != PAPI_VER_CURRENT)  test_fail(__FILE__, __LINE__, "PAPI_library_init", retval);

  if ( !TESTS_QUIET ) {
	retval = PAPI_set_debug(PAPI_VERB_ECONT);
	if (retval != PAPI_OK) test_fail(__FILE__, __LINE__, "PAPI_set_debug", retval);
  }

  /* gotta count flops to run this test */
  if (retval = PAPI_query_event(PAPI_FP_INS) != PAPI_OK)
	test_skip(__FILE__, __LINE__, "PAPI_query_event", retval);

  EventSet1 = add_test_events(&num_events1,&mask1);
  EventSet2 = add_test_events(&num_events2,&mask2);
{'fraction_non_alphanumeric': 0.09781167108753315, 'fraction_numerical': 0.011273209549071617, 'mean_word_length': 3.85829307568438, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2182535', 'n_tokens_mistral': 1098, 'n_tokens_neox': 1071, 'n_words': 306}