Exemplo n.º 1
0
int main() {
        int ret; 
	int i; 
	int passed = 0;
	int failed = 0;
        slog_init(NULL, 0);
        struct aura_node *n = aura_open("simpleusb", "../simpleusbconfigs/susb-test.conf");

        if (!n) { 
                printf("err\n");
                return -1;
        }

	i = 100; 
	while (i--) { 
		printf("Testing %d remaining\r", i);
		fflush(stdout);
		aura_wait_status(n, AURA_STATUS_ONLINE);
		struct aura_buffer *retbuf; 
		ret = aura_call(n, "led_ctl", &retbuf, 0x100, 0x100);
		if (0 == ret) {
			aura_buffer_release(retbuf); 
			passed++;
		} else
			failed++;
	}

        aura_close(n);

	printf("Stability test (no data): %d succeeded, %d failed total %d\n",
	       passed, failed, passed + failed);

        return failed;
}
Exemplo n.º 2
0
int main() {
	slog_init(NULL, 18);

	int count = 5;
	int ret; 
	struct aura_node *n = aura_open("dummy", NULL);
	aura_wait_status(n, AURA_STATUS_ONLINE);

	struct aura_buffer *retbuf; 
	const struct aura_object *o; 

	aura_enable_sync_events(n, 5);

	while (count--) { 
		ret = aura_get_next_event(n, &o, &retbuf);
		slog(0, SLOG_DEBUG, "evt get ret %d", ret);
		
		aura_hexdump("Out buffer", retbuf->data, retbuf->size);
		aura_buffer_release(retbuf);
	}

	aura_close(n);

	return 0;
}
Exemplo n.º 3
0
int
server_start(struct server *s) {

	int i, ret;

	/* initialize libevent */
	s->base = event_base_new();

	if(s->cfg->daemonize) {
		server_daemonize(s->cfg->pidfile);

		/* sometimes event mech gets lost on fork */
		if(event_reinit(s->base) != 0) {
			fprintf(stderr, "Error: event_reinit failed after fork");
		}
	}

	/* ignore sigpipe */
#ifdef SIGPIPE
	signal(SIGPIPE, SIG_IGN);
#endif

	slog_init(s);

	/* install signal handlers */
	server_install_signal_handlers(s);

	/* start worker threads */
	for(i = 0; i < s->cfg->http_threads; ++i) {
		worker_start(s->w[i]);
	}

	/* create socket */
	s->fd = socket_setup(s, s->cfg->http_host, s->cfg->http_port);
	if(s->fd < 0) {
		return -1;
	}
	
	/*set keepalive socket option to do with half connection*/
        int keep_alive = 1;
        setsockopt(s->fd , SOL_SOCKET, SO_KEEPALIVE, (void*)&keep_alive, sizeof(keep_alive));

	/* start http server */
	event_set(&s->ev, s->fd, EV_READ | EV_PERSIST, server_can_accept, s);
	event_base_set(s->base, &s->ev);
	ret = event_add(&s->ev, NULL);

	if(ret < 0) {
		slog(s, WEBDIS_ERROR, "Error calling event_add on socket", 0);
		return -1;
	}

	slog(s, WEBDIS_INFO, "Webdis " WEBDIS_VERSION " up and running", 0);
	event_base_dispatch(s->base);

	return 0;
}
Exemplo n.º 4
0
int main(int argc, char **argv) {
	slog_init("dash", "slog.cfg", 400, 500, 1);
	slog(400, SLOG_INFO, "Starting arcs-dash");

	r_args = calloc(1, sizeof(struct runtime_args));
	parse_args(r_args, argc, argv);
	bool valid_viewer = r_args->r_viewer_ip != NULL;

	mode = MODE_DISABLED;

	screen_init();
	kb_connect();
	connect_comms();

	char *js = found_js();
	if (js != NULL) {
		js_connect(js);
	}

	struct iface_args *props = calloc(1, sizeof(struct iface_args));
	props->js = (js == NULL) ? "Not found" : js;

	while (true) {
		if (props->jsstat.btn_guide) {
			slog(400, SLOG_INFO, "Quit due to guide button press");
			break;
		}
		pthread_mutex_lock(&kb_lock);
		if (get_kb_status()->close_request) {
			slog(400, SLOG_INFO, "Quit due to keyboard press");
			break;
		}
		pthread_mutex_unlock(&kb_lock);
		usleep(10000);
		pthread_mutex_lock(&js_lock);
		props->jsstat = get_js_state();
		props->remote = addrstr();
		props->mode = mode;
		props->use_viewer = valid_viewer && get_kb_status()->use_viewer;
		props->viewer_ip = valid_viewer ? r_args->r_viewer_ip : "NULL";
		redraw(props);

		update_comms(get_js_state(), mode,
					 valid_viewer && get_kb_status()->use_viewer,
					 r_args->r_viewer_ip);

		pthread_mutex_unlock(&js_lock);
	}
	slog(400, SLOG_INFO, "Exiting");

	free(props);
	free(r_args);
	screen_close();
	disconnect_comms();
	return 0;
}
Exemplo n.º 5
0
int server_start(struct server *s) {
    int i, ret;


    /* setrlimit */
    server_setrlimit(8192);

    /* daemonize */
    if (s->cfg->daemonize) {
        server_daemonize(s->cfg->pid);

        /* sometimes event mech gets lost on fork */
        if (event_reinit(s->base) != 0) {
            fprintf(stderr, "Error: event_reinit failed after fork");
        }
    }

    /* ignore sigpipe */
#ifdef SIGPIPE
    signal(SIGPIPE, SIG_IGN);
#endif

    /* lose root privileges if we have them */
    /*ret = server_setuid(s->cfg->user);
    if(ret < 0) {
        return -1;
    }*/

    /* slog init */
    slog_init(s);

    /* install signal handlers */
    server_install_signal_handlers(s);

    /* initialize libevent */
    s->base = event_base_new();

    /* start worker threads */
    for (i = 0; i < s->cfg->worker_processes; ++i) {
        worker_start(s->w[i]);
    }

    /* create socket */
	ret = socket_setup(s, s->cfg->http.servers);
    if(ret < 0) {
		return -1;
	}

    /* dispatch */
    slog(s, LOG_INFO, "pbiws " PBIWS_VERSION " up and running", 0);
    event_base_dispatch(s->base);

    return 0;
}
Exemplo n.º 6
0
static int l_slog_init(lua_State *L)
{
	const char *fname;
	int level;

	TRACE();
	aura_check_args(L, 2);
	fname = lua_tostring(L, 1);
	level = lua_tonumber(L, 2);
	slog_init(fname, level);
	return 0;
}
Exemplo n.º 7
0
static void server_handle_signal(int id) {
    switch (id) {
        case SIGHUP:
            slog_init(__server);
            break;
        case SIGTERM:
        case SIGINT:
            slog(__server, LOG_INFO, "pbiws terminating", 0);
            exit(0);
            break;
        default:
            break;
    }
}
Exemplo n.º 8
0
Arquivo: example.c Projeto: pjc42/slog
int main()
{
    /* Used variables */
    char char_arg[32];
    int int_arg;

    /* Init args */
    strcpy(char_arg, "test string");
    int_arg = 69;

    /* Greet users */
    greet();

    /* 
     * slog_init - Initialise slog 
     * First argument is log filename 
     * Second argument is config file
     * Third argument is max log level 
     * Fouth is thread safe flag.
     */
    slog_init("example", "slog.cfg", 3, 1);

    /* Log and print something with level 0 */
    slog(0, SLOG_LIVE, "Test message with level 0");

    /* Log and print something with level 1 */
    slog(1, SLOG_WARN, "Warn message with level 1");

    /* Log and print something with level 2 */
    slog(2, SLOG_INFO, "Info message with level 2");

    /* Log and print something with level 3 */
    slog(3, SLOG_LIVE, "Test message with level 3");

    /* Log and print something with char argument */
    slog(0, SLOG_DEBUG, "Debug message with char argument: %s", char_arg);

    /* Log and print something with int argument */
    slog(0, SLOG_ERROR, "Error message with int argument: %d", int_arg);

    /* Test log with higher level than log max value 
    * This will never be printed while log level argument is higher than max log level */
    slog(4, SLOG_NONE, "[LIVE] Test log with higher level than log max value");

    /* Print something with our own colorized line */
    slog(0, SLOG_NONE, "[%s] This is our own colorized string", strclr(CLR_GREEN, "TEST"));

    return 0;
}
Exemplo n.º 9
0
int
server_start(struct server *s) {

	int i, ret;

	/* initialize libevent */
	s->base = event_base_new();

	if(s->cfg->daemonize) {
		server_daemonize();

		/* sometimes event mech gets lost on fork */
		if(event_reinit(s->base) != 0) {
			fprintf(stderr, "Error: event_reinit failed after fork");
		}
	}

	/* ignore sigpipe */
#ifdef SIGPIPE
	signal(SIGPIPE, SIG_IGN);
#endif

	slog_init(s);

	/* start worker threads */
	for(i = 0; i < s->cfg->http_threads; ++i) {
		worker_start(s->w[i]);
	}

	/* create socket */
	s->fd = socket_setup(s->cfg->http_host, s->cfg->http_port);
	if(s->fd < 0) {
		return -1;
	}

	/* start http server */
	event_set(&s->ev, s->fd, EV_READ | EV_PERSIST, server_can_accept, s);
	event_base_set(s->base, &s->ev);
	ret = event_add(&s->ev, NULL);

	if(ret < 0) {
		slog(s, WEBDIS_ERROR, "Error calling event_add on socket", 0);
		return -1;
	}

	event_base_dispatch(s->base);

	return 0;
}
Exemplo n.º 10
0
int main() {
	slog_init(NULL, 18);

	int ret; 
	struct aura_node *n = aura_open("dummy", NULL);
	struct aura_buffer *retbuf; 

	ret = aura_call(n, "echo_u16", &retbuf, 0x0102);
	slog(0, SLOG_DEBUG, "call ret %d", ret);
	aura_hexdump("Out buffer", retbuf->data, retbuf->size);
	aura_buffer_release(n, retbuf);
	aura_close(n);

	return 0;
}
Exemplo n.º 11
0
int main() {
	slog_init(NULL, 18);

	int ret; 
	struct aura_node *n = aura_open("dummy", NULL);
	ret = aura_start_call_raw(n, 2, calldonecb, (void *) ARG, 0x0102);
	printf("call started with ret %d\n", ret);

	ret = aura_set_event_callback_raw(n, 5, pingcb, (void *) ARG2);
	printf("event handler set with ret %d\n", ret);
	aura_handle_events_forever(aura_eventloop_get_data(n));
	printf("Closing the shop...");
	aura_close(n);

	return 0;
}
Exemplo n.º 12
0
int main() {
	slog_init(NULL, 18);

	int ret;
	struct aura_node *n = aura_open("dummy", NULL);
	aura_wait_status(n, AURA_STATUS_ONLINE);

	ret = aura_start_call(n, "echo_u16", calldonecb, (void *) ARG, 0x0102);
	printf("call started with ret %d\n", ret);
	if (ret !=0)
		return ret;

	ret = aura_set_event_callback(n, "ping", pingcb, (void *) ARG2);
	printf("event handler set with ret %d\n", ret);
	aura_eventloop_dispatch(aura_node_eventloop_get(n), 0);
	printf("Closing the shop...");
	aura_close(n);

	return 0;
}
Exemplo n.º 13
0
int main() {
        int ret; 
        int i = 2; 
        slog_init(NULL, 88);
        struct aura_node *n = aura_open("simpleusb", "./simpleusbconfigs/pw-ctl.conf");

        if (!n) { 
                printf("err\n");
                return -1;
        }
        aura_wait_status(n, AURA_STATUS_ONLINE);

        struct aura_buffer *retbuf; 
        ret = aura_call(n, "bit_set", &retbuf, 12<<8 | 1, 1);
        slog(0, SLOG_DEBUG, "call ret %d", ret);
        if (0 == ret) {
                printf("====> buf pos %d len %d\n", retbuf->pos, retbuf->size);
		aura_buffer_release(n, retbuf); 
        }

	int v = 1; 	
	while(1) {
		v = !v;
		printf("<=================>\n");
		ret = aura_call(n, "bit_set", &retbuf, 12<<8, v);
		slog(0, SLOG_DEBUG, "call ret %d", ret);
		if (0 == ret) {
			printf("====> buf pos %d len %d\n", retbuf->pos, retbuf->size);
			aura_buffer_release(n, retbuf); 
		} else {
			aura_wait_status(n, AURA_STATUS_ONLINE);
			i--;
			if (!i)
				goto bailout;
		}
		sleep(1);
        }
bailout:
        aura_close(n);
        return 0;
}
Exemplo n.º 14
0
int main()
{
	slog_init(NULL, 18);

	struct aura_node *n = aura_open("nmc", "./aura-test.abs");
	if (!n) {
		slog(0, SLOG_ERROR, "Failed to open node");
		exit(1);
	}
	aura_wait_status(n, AURA_STATUS_ONLINE);

	test_u32(n);
	test_u64(n);
	test_u32u32(n);
	test_bin(n);
	test_buf(n);

	aura_close(n);

	return 0;
}
Exemplo n.º 15
0
int main() {
	slog_init(NULL, 18);

	int ret; 
	struct aura_node *n = aura_open("dummy", NULL);
	struct aura_buffer *retbuf; 
	struct aura_buffer *iobuf = aura_buffer_request(n, 80);

	ret = aura_call(n, "echo_buf", &retbuf, iobuf);
	slog(0, SLOG_DEBUG, "call ret %d", ret);
	if (ret)
		BUG(n, "call failed");
	struct aura_buffer *tmp = aura_buffer_get_buf(retbuf);
	if (tmp != iobuf)
		BUG(n, "test not ok");

	aura_buffer_release(n, retbuf);
	aura_buffer_release(n, tmp);
	aura_close(n);

	return 0;
}
Exemplo n.º 16
0
int main() {
	slog_init(NULL, 0);
	int num_runs = 5;
#ifdef AURA_USE_BUFFER_POOL
	printf("Buffer pool enabled!");
#else
	printf("Buffer pool disabled!");
#endif

	struct aura_node *n = aura_open(TRANSPORT, NULL);
	printf("+GC -PREHEAT\n");
	aura_unhandled_evt_cb(n, unhandled_cb, (void *) 0);
	average_aggregate(n, run_first, num_runs, "call test");
//	average_aggregate(n, run_second, num_runs, "alloc/dealloc test");
	aura_close(n);

	n = aura_open(TRANSPORT, NULL);

	printf("+GC +PREHEAT\n");
	aura_unhandled_evt_cb(n, unhandled_cb, (void *) 0);
	aura_bufferpool_preheat(n, 512, 10);
	average_aggregate(n, run_first, num_runs, "call test");
//	average_aggregate(n, run_second, num_runs, "alloc/dealloc test");
	aura_close(n);

	n = aura_open(TRANSPORT, NULL);

	printf("-GC -PREHEAT\n");
	aura_unhandled_evt_cb(n, unhandled_cb, (void *) 0);
	n->gc_threshold = -1;
	average_aggregate(n, run_first, num_runs, "call test");
//	average_aggregate(n, run_second, num_runs, "alloc/dealloc test");
	aura_close(n);

	return 0;
}
Exemplo n.º 17
0
int xlog_set_level(int level)
{
    return slog_init(&g_slog_obj, level);
}
Exemplo n.º 18
0
int main(int argc, char *argv[])
{
	struct event_base *base = NULL;

	struct event *sigint_event = NULL;
	struct event *sigterm_event = NULL;
	
	struct rtsp_server_param rs_param;
	struct rtsp_server *rs = NULL;

    slog_init(SLOG_DEBUG);

	/* create event base */
	base = event_base_new();
	if (!base) {
		SLOG(SLOG_ERROR, "failed to create event base");
		return -1;
	}
	
	/* install signal handle */
	sigint_event = evsignal_new(base, SIGINT, signal_quit_cb, (void *)base);
	if (!sigint_event) {
		SLOG(SLOG_ERROR, "failed to create sigint event");
		goto failed;
	}
	sigterm_event = evsignal_new(base, SIGTERM, signal_quit_cb, (void *)base);
	if (!sigterm_event) {
		SLOG(SLOG_ERROR, "failed to create sigterm event");
		goto failed;
	}
	event_add(sigint_event, NULL);
	event_add(sigterm_event, NULL);

	/* init rtsp-server param */
	rs_param.port = 8554;
	rs_param.enable_http_tunnel = 1;
	rs_param.http_tunnel_port = 8080;
	rs_param.udp_port_range[0] = 20000;
	rs_param.udp_port_range[1] = 30000;
	rs_param.max_sessions = 10;

	/* start up rtsp-server */
	rs = rtsp_server_new(base, &rs_param);
	if (!rs) {
		SLOG(SLOG_ERROR, "failed to create rtsp server");
		goto failed;
	}
	
	/* start eventloop */
	event_base_dispatch(base);
	/* fall throught when normal exit */

    SLOG(SLOG_NOTICE, "server exit");
failed:
	if (rs)
		rtsp_server_free(rs);
	
	/* uninstall signal handler */
	if (sigterm_event)
		evsignal_del(sigterm_event);
	if (sigint_event)
		evsignal_del(sigint_event);
	
	if (base)
		event_base_free(base);

	return 0;
}
Exemplo n.º 19
0
int main (int argc, char *argv[]) {
    /* set up i18n */
    bindtextdomain (PACKAGE, LOCALEDIR);
    setlocale (LC_ALL, "");
    textdomain (PACKAGE);

    GError* error = NULL;
    GOptionContext* context = g_option_context_new ("files");
    g_option_context_add_main_entries (context, entries, PACKAGE);
    g_option_context_parse (context, &argc, &argv, &error);
    if (error) g_error("%s\n", error->message);

    /* initialize GTK */
    g_thread_init (NULL);
    gdk_threads_init ();
    gtk_init (&argc, &argv);
    GError* ui_error = NULL;
    GtkBuilder* builder = gtk_builder_new ();
    gchar* ui = g_build_filename (DATADIR, "ui", "gummi.glade", NULL);
    
    // exit program when gummi.glade can not be located:
    if (!g_file_test (ui, G_FILE_TEST_EXISTS)) {
        printf("Could not locate Glade interface file at:\n%s\n", ui);
        return 0;
    }
    
    gtk_builder_add_from_file (builder, ui, &ui_error);
    if (ui_error) {
        g_error ("%s\n", ui_error->message);
    }
    gtk_builder_set_translation_domain (builder, PACKAGE);
    g_free (ui);

    /* Initialize logging */
    slog_init (debug);
    slog (L_INFO, PACKAGE_NAME" version: "PACKAGE_VERSION"\n");

    /* Initialize configuration */
    gchar* configname = g_build_filename (g_get_user_config_dir (), "gummi",
                                  "gummi.cfg", NULL);
    config_init (configname);
    config_load ();
    g_free (configname);

    /* Initialize signals */
    gummi_signals_register ();

    /* Initialize Classes */
    gchar* snippetsname = g_build_filename (g_get_user_config_dir (), "gummi",
            "snippets.cfg", NULL);

    // why do we not load this from environment, like gui-main does? -A
    GuMotion* motion = motion_init ();
    GuIOFunc* io = iofunctions_init();
    GuLatex* latex = latex_init (); 
    GuBiblio* biblio = biblio_init (builder);
    GuTemplate* templ = template_init (builder);
    GuTabmanager* tabm = tabmanager_init ();
    GuProject* proj = project_init ();

    GuSnippets* snippets = snippets_init (snippetsname);
    gummi = gummi_init (motion, io, latex, biblio, templ, snippets, tabm, proj);
    slog (L_DEBUG, "Gummi created!\n");
    g_free (snippetsname);

    /* Initialize GUI */
    gui = gui_init (builder);
    
    slog_set_gui_parent (gui->mainwindow);
    slog (L_DEBUG, "GummiGui created!\n");

    /* Start compile thread */
    if (external_exists (config_get_value("typesetter"))) {
        typesetter_setup ();
        motion_start_compile_thread (motion);
    }
    else {
        infoscreengui_enable (gui->infoscreengui, "program_error");
        slog (L_ERROR, "Could not locate the typesetter program\n");
    }

    /* Install acceleration group to mainwindow */
    gtk_window_add_accel_group (gui->mainwindow, snippets->accel_group);

    if (argc != 2)
        tabmanager_create_tab (A_DEFAULT, NULL, NULL);
    else {
        if (!g_file_test(argv[1], G_FILE_TEST_EXISTS)) {
            slog(L_ERROR, "Failed to open file '%s': No such file or "
                    "directory\n", argv[1]);
            exit(1);
        }
        tabmanager_create_tab (A_LOAD, argv[1], NULL);
    }
        
    if (config_get_value ("autosaving")) iofunctions_start_autosave ();

    gui_main (builder);
    config_save ();
    config_clean_up ();
    return 0;
}
Exemplo n.º 20
0
int main() {

	printf("START-%s\n", aura_get_version());
	slog_init(NULL, 0);
       sleep(1);
	int ret; 
		n = aura_open("nmc", "./rpc-demo.abs");
	if (!n) {
		printf("ERROR:Failed to open node\n");
		slog (0, SLOG_ERROR, "Failed to open node");
		exit(1);
	}
	printf("START-1\n");
	aura_wait_status(n, AURA_STATUS_ONLINE);

	printf("START-2\n");
	static signed char  src0_8s[256] ,    src1_8s[256];
	static signed short src0_16s[256],    src1_16s[256];
	static signed int   src0_32s[2*2048], src1_32s[256];
	static long long    src0_64s[256], src1_64s[256];
	static signed char  dst_8s[256];
	signed short dst_16s[256];
	signed int 	 dst_32s[2*2048];
	signed long long dst_64s[256];
	
	int i=0;

	for(i=0; i<256; i++){
		src0_8s[i] =i;  
		src0_16s[i]=i;  
		src0_32s[i]=i;  
		src0_64s[i]=i;  
		            
		src1_8s[i] =8-i;
		src1_16s[i]=8-i;
		src1_32s[i]=8-i;
		src1_64s[i]=8-i;
	}
	
	unsigned crc=-1;
	
	nmppsRShiftC_8s ((nm8s* )src0_8s ,1,(nm8s* )dst_8s ,16);				nmppsCrcAcc_8s (dst_8s, 8, &crc);
	nmppsRShiftC_16s((nm16s*)src0_16s,1,(nm16s*)dst_16s,16);                nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsRShiftC_32s((nm32s*)src0_32s,1,(nm32s*)dst_32s,16);                nmppsCrcAcc_32s(dst_32s,16,&crc);
	nmppsRShiftC_64s((nm64s*)src0_64s,1,(nm64s*)dst_64s,16);                nmppsCrcAcc_64s(dst_64s,16,&crc);
                                                                                                    
	nmppsRShiftC_8u ((nm8u* )src0_8s ,1,(nm8u* )dst_8s ,16);				nmppsCrcAcc_8s (dst_8s, 16,&crc);
	nmppsRShiftC_16u((nm16u*)src0_16s,1,(nm16u*)dst_16s,16);                nmppsCrcAcc_16s(dst_16s,16,&crc);
 	nmppsRShiftC_32u((nm32u*)src0_32s,1,(nm32u*)dst_32s,16);                nmppsCrcAcc_32s(dst_32s,16,&crc);
	nmppsRShiftC_64u((nm64u*)src0_64s,1,(nm64u*)dst_64s,16);                nmppsCrcAcc_64s(dst_64s,16,&crc);
                                                                                                    
	nmppsAndC_8u((nm8u*)  src0_8s, 5, (nm8s*) dst_8s,16);					nmppsCrcAcc_8s (dst_8s, 16,&crc);
	nmppsAndC_16u((nm16u*)src0_16s,5,(nm16u*)dst_16s,16);                   nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsAndC_32u((nm32u*)src0_32s,5,(nm32u*)dst_32s,16);                   nmppsCrcAcc_32s(dst_32s,16,&crc);
	nmppsAndC_64u((nm64u*)src0_64s,5,(nm64u*)dst_64s,16);                   nmppsCrcAcc_64s(dst_64s,16,&crc);
                                                                                                    
	nmppsOrC_8u ((nm8u*)src0_8s,1,  (nm8s*) dst_8s,16);						nmppsCrcAcc_8s (dst_8s, 16,&crc);
	nmppsOrC_16u((nm16u*)src0_16s,1,(nm16u*)dst_16s,16);                    nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsOrC_32u((nm32u*)src0_32s,1,(nm32u*)dst_32s,16);                    nmppsCrcAcc_32s(dst_32s,16,&crc);
	nmppsOrC_64u((nm64u*)src0_64s,1,(nm64u*)dst_64s,32);                    nmppsCrcAcc_64s(dst_64s,32,&crc);
                                                                                                    
	nmppsXorC_8u((nm8u*)  src0_8s,1, (nm8s*) dst_8s,16);					nmppsCrcAcc_8s (dst_8s, 16,&crc);
	nmppsXorC_16u((nm16u*)src0_16s,1,(nm16u*)dst_16s,16);                   nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsXorC_32u((nm32u*)src0_32s,1,(nm32u*)dst_32s,16);                   nmppsCrcAcc_32s(dst_32s,16,&crc);
	nmppsXorC_64u((nm64u*)src0_64s,1,(nm64u*)dst_64s,32);                   nmppsCrcAcc_64s(dst_64s,32,&crc);
	                                                                                                
	nmppsNot_8u ((nm8u* )src0_8s, (nm8s* )dst_8s ,16);						nmppsCrcAcc_8s (dst_8s, 16,&crc);
	nmppsNot_16u((nm16u*)src0_16s,(nm16s*)dst_16s,16);                      nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsNot_32u((nm32u*)src0_32s,(nm32s*)dst_32s,16);                      nmppsCrcAcc_32s(dst_32s,16,&crc);
	nmppsNot_64u((nm64u*)src0_64s,(nm64s*)dst_64s,16);                      nmppsCrcAcc_64s(dst_64s,16,&crc);
                                                                                                    
	nmppsAnd_8u ((nm8u*) src0_8s, (nm8u*) src1_8s, (nm8s*) dst_8s,16);		nmppsCrcAcc_8s (dst_8s, 16,&crc);
	nmppsAnd_16u((nm16u*)src0_16s,(nm16u*)src1_16s,(nm16u*)dst_16s,16);     nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsAnd_32u((nm32u*)src0_32s,(nm32u*)src1_32s,(nm32u*)dst_32s,16);     nmppsCrcAcc_32s(dst_32s,16,&crc);
	nmppsAnd_64u((nm64u*)src0_64s,(nm64u*)src1_64s,(nm64u*)dst_64s,32);     nmppsCrcAcc_64s(dst_64s,32,&crc);
	                                                                                                
	nmppsOr_8u ((nm8u*) src0_8s, (nm8u*) src1_8s, (nm8s*) dst_8s,16);		nmppsCrcAcc_8s (dst_8s, 16,&crc);
	nmppsOr_16u((nm16u*)src0_16s,(nm16u*)src1_16s,(nm16u*)dst_16s,16);      nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsOr_32u((nm32u*)src0_32s,(nm32u*)src1_32s,(nm32u*)dst_32s,16);      nmppsCrcAcc_32s(dst_32s,16,&crc);
	nmppsOr_64u((nm64u*)src0_64s,(nm64u*)src1_64s,(nm64u*)dst_64s,32);      nmppsCrcAcc_64s(dst_64s,32,&crc);
                                                                                                    
	nmppsXor_8u ((nm8u*) src0_8s, (nm8u*) src1_8s, (nm8s*) dst_8s,16);		nmppsCrcAcc_8s (dst_8s, 16,&crc);
	nmppsXor_16u((nm16u*)src0_16s,(nm16u*)src1_16s,(nm16u*)dst_16s,16);     nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsXor_32u((nm32u*)src0_32s,(nm32u*)src1_32s,(nm32u*)dst_32s,16);     nmppsCrcAcc_32s(dst_32s,16,&crc);
	nmppsXor_64u((nm64u*)src0_64s,(nm64u*)src1_64s,(nm64u*)dst_64s,32);     nmppsCrcAcc_64s(dst_64s,32,&crc);

	nmppsCmpLtC_8s8um ((nm8s*) src0_8s ,1,(nm8u*)dst_8s,16,0);				nmppsCrcAcc_8s (dst_8s, 16,&crc); 
	nmppsCmpLtC_16s8um((nm16s*)src0_16s,1,(nm8u*)dst_8s,16,0);              nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsCmpLtC_32s8um((nm32s*)src0_32s,1,(nm8u*)dst_8s,16,0);              nmppsCrcAcc_32s(dst_32s,16,&crc);
//	nmppsCmpLtC_64s8um((nm64s*)src0_32s,1,(nm8u*)dst_8s,16,0);              //nmppsCrcAcc_64s(dst_64s,16,&crc);
                                                                            //
	nmppsCmpNeC_8s8um ((nm8s*) src0_8s ,1,(nm8u*)dst_8s,16,0);				nmppsCrcAcc_8s (dst_8s, 16,&crc);  
	nmppsCmpNeC_16s8um((nm16s*)src0_16s,1,(nm8u*)dst_8s,16,0);              nmppsCrcAcc_16s(dst_16s,16,&crc);
	nmppsCmpNeC_32s8um((nm32s*)src0_32s,1,(nm8u*)dst_8s,16,0);              nmppsCrcAcc_32s(dst_32s,16,&crc);
//	nmppsCmpNeC_64s8um((nm64s*)src0_64s,1,(nm8u*)dst_8s,16,0);              //nmppsCrcAcc_64s(dst_64s,64,&crc);

	nmppsCmpNe_8s8um  ((nm8s*) src0_8s , (nm8s*) src1_8s ,(nm8u*)dst_8s, 16, 0);	nmppsCrcAcc_8s (dst_8s, 16,&crc);		
	nmppsCmpNe_16s8um ((nm16s*)src0_16s, (nm16s*)src1_16s,(nm8u*)dst_8s, 16, 0);	nmppsCrcAcc_16s(dst_16s,16,&crc);	
	nmppsCmpNe_32s8um ((nm32s*)src0_32s, (nm32s*)src1_32s,(nm8u*)dst_8s, 16, 0);	nmppsCrcAcc_32s(dst_32s,16,&crc);	
//	nmppsCmpNe_64s8um ((nm64s*)src0_64s, (nm64s*)src1_64s,(nm8u*)dst_8s, 16, 0);	//nmppsCrcAcc_64s(dst_64s,16,&crc);	
                                                                                    
																					//for(i=0; i<16; i++)	dst_8s[i]=-1;
	nmppsCmpLt_8s8um  ((nm8s*) src0_8s , (nm8s*) src1_8s ,(nm8u*)dst_8s, 16, 0);	nmppsCrcAcc_8s (dst_8s, 16,&crc);	
	nmppsCmpLt_16s8um ((nm16s*)src0_16s, (nm16s*)src1_16s,(nm8u*)dst_8s, 16, 0);	nmppsCrcAcc_16s(dst_16s,16,&crc);	
	nmppsCmpLt_32s8um ((nm32s*)src0_32s, (nm32s*)src1_32s,(nm8u*)dst_8s, 16, 0);	nmppsCrcAcc_32s(dst_32s,16,&crc);	
//	nmppsCmpLt_64s8um ((nm64s*)src0_32s, (nm64s*)src1_32s,(nm8u*)dst_8s, 16, 0);	//nmppsCrcAcc_64s(dst_64s,16,&crc);	

	
	aura_close(n);
	slog (0, SLOG_INFO, "Finished");
	printf("CRC=%x\n",crc);
	return crc-0xc354a8e4;;
}