OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-CompactHash commits / 0e41a62

Disabling code generation and cleaning up output format
0e41a62f59a08ce69ac151449cfb39c0ad30b012
by Bob Robey <brobey@lanl.gov> · 2019-04-14T14:58:32.000Z

Changed files (2) +27 -27

HashFactory/CMakeLists.txt +19 -19
……@@ -1,28 +1,28 @@
11set(libHashFactory_LIB_SRCS CLHash_Utilities.c HashFactory.c CLHash_Utilities.h HashFactory.h)
22
3set(INDENT indent)
4set(CPREPROCESSOR cpp)
3#set(INDENT indent)
4#set(CPREPROCESSOR cpp)
55
66#COMMAND ${CPREPROCESSOR} -CC -x c -imacros HashFactory.hm HashFactory.hp | ${INDENT} -linux -brf -o HashFactory.h
77
88########### generate sources target ###############
9add_custom_target(HashFactory.h ALL
10 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.hm ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.hp
11 ${CMAKE_CURRENT_SOURCE_DIR}/perfectHash.hm ${CMAKE_CURRENT_SOURCE_DIR}/compactHash.hm
12 COMMAND cpp -P -CC -x c -imacros HashFactory.hm HashFactory.hp | indent -linux -brf -o HashFactory.h)
13
14add_custom_target(HashFactory.c ALL
15 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.cm ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.cp
16 ${CMAKE_CURRENT_SOURCE_DIR}/perfectHash.cm ${CMAKE_CURRENT_SOURCE_DIR}/compactHash.cm
17 HashFactory.cl HashFactory.h
18 COMMAND cpp -P -CC -x c -imacros HashFactory.cm HashFactory.cp | indent -linux -brf |
19 sed -e '/OMP_PRAGMA_PARALLEL_FOR/s/[[:space:]]*OMP_PRAGMA_PARALLEL_FOR\;/\#pragma omp parallel for/' > HashFactory.c &&
20 ${CMAKE_CURRENT_SOURCE_DIR}/embed_source.pl HashFactory.cl >> ${CMAKE_CURRENT_BINARY_DIR}/HashFactory.c)
21
22add_custom_target(HashFactory.cl ALL
23 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.clp ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.cm
24 ${CMAKE_CURRENT_SOURCE_DIR}/perfectHash.cm ${CMAKE_CURRENT_SOURCE_DIR}/compactHash.cm
25 COMMAND cpp -P -CC -x c -imacros HashFactory.cm HashFactory.clp | indent -linux -brf -o HashFactory.cl)
9#add_custom_target(HashFactory.h ALL
10# DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.hm ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.hp
11# ${CMAKE_CURRENT_SOURCE_DIR}/perfectHash.hm ${CMAKE_CURRENT_SOURCE_DIR}/compactHash.hm
12# COMMAND cpp -P -CC -x c -imacros HashFactory.hm HashFactory.hp | indent -linux -brf -o HashFactory.h)
13#
14#add_custom_target(HashFactory.c ALL
15# DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.cm ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.cp
16# ${CMAKE_CURRENT_SOURCE_DIR}/perfectHash.cm ${CMAKE_CURRENT_SOURCE_DIR}/compactHash.cm
17# HashFactory.cl HashFactory.h
18# COMMAND cpp -P -CC -x c -imacros HashFactory.cm HashFactory.cp | indent -linux -brf |
19# sed -e '/OMP_PRAGMA_PARALLEL_FOR/s/[[:space:]]*OMP_PRAGMA_PARALLEL_FOR\;/\#pragma omp parallel for/' > HashFactory.c &&
20# ${CMAKE_CURRENT_SOURCE_DIR}/embed_source.pl HashFactory.cl >> ${CMAKE_CURRENT_BINARY_DIR}/HashFactory.c)
21#
22#add_custom_target(HashFactory.cl ALL
23# DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.clp ${CMAKE_CURRENT_SOURCE_DIR}/HashFactory.cm
24# ${CMAKE_CURRENT_SOURCE_DIR}/perfectHash.cm ${CMAKE_CURRENT_SOURCE_DIR}/compactHash.cm
25# COMMAND cpp -P -CC -x c -imacros HashFactory.cm HashFactory.clp | indent -linux -brf -o HashFactory.cl)
2626
2727########### embed source target ###############
2828add_custom_target(HashFactory_source.inc ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/HashFactory.cl
neigh2d.c +8 -8
……@@ -276,7 +276,7 @@ int main (int argc, const char * argv[])
276276 if (strcmp(argv[i], "-N") == 0) {
277277 i++;
278278 n_max =(int)(atoi(argv[i]));
279 }
279 }
280280 if (strcmp(argv[i], "-o") == 0) {
281281 i++;
282282 int option_size = 0;
……@@ -287,7 +287,7 @@ int main (int argc, const char * argv[])
287287 printf("Please add tests: br, kd, hc, hlc, hc1, hlc1, hc2, hlc2, hc3, hlc3, holc3, hg, hg1, hg2, hg3, hg4\n");
288288 return 0;
289289 }
290 sprintf(header,"Size, \tncells, \tcompression,");
290 sprintf(header,"Size, \tlevmx: \tncells, \tcompression,");
291291 if(WRITE_MEM_USAGE) fprintf(fmem,"Size, \tncells, ");
292292 fflush(stdout);
293293 options = (int*)malloc((option_size+2)*sizeof(int));
……@@ -298,7 +298,7 @@ int main (int argc, const char * argv[])
298298 for (int iopt = 0; iopt < nopts; iopt++){
299299 if (strcmp(argv[i], inputopt[iopt]) == 0) {
300300 option = inputkey[iopt];
301 sprintf(add_string,"\t%s,",descriptor[iopt]);
301 sprintf(add_string," \t%s,",descriptor[iopt]);
302302 strcat(header,add_string);
303303 if(WRITE_MEM_USAGE) fprintf(fmem,"\t%s,",descriptor[iopt]);
304304 break;
……@@ -313,7 +313,7 @@ int main (int argc, const char * argv[])
313313 i++;
314314 }
315315 options[j] = END_CHARACTER;
316 strcat(header,"\n");
316 //strcat(header,"\n");
317317 if(WRITE_MEM_USAGE) fprintf(fmem,"\n");
318318 }
319319 }
……@@ -381,14 +381,14 @@ int main (int argc, const char * argv[])
381381 printf("\n 2D Neighbors Performance Results\n\n");
382382 printf("%s\n",header);
383383
384 printf("\nThreshold for refinement is %f\n",threshold);
385 printf("\nWork group size is %d and init workgroup size is %d\n",TILE_SIZE,TILE_SIZE_INIT);
384 //printf("\nThreshold for refinement is %f\n",threshold);
385 //printf("\nWork group size is %d and init workgroup size is %d\n",TILE_SIZE,TILE_SIZE_INIT);
386386 for (uint levmx = levmx_min; levmx < levmx_max; levmx++ ){
387 printf("\nMax levels is %d\n",levmx);
387 //printf("\nMax levels is %d\n",levmx);
388388 if(WRITE_MEM_USAGE) fprintf(fmem,"\nMax levels is %d\n",levmx);
389389 for( uint i = n_min; i <= n_max; i*=2 ) {
390390 if (levmx > 3 && i > 512) continue;
391 printf("%d, ", i);
391 printf("%d, \t%d: ", i,levmx);
392392 if(WRITE_MEM_USAGE) fprintf(fmem,"%d, ", i);
393393 neighbors2d(i, levmx, threshold, options, haveGPU);
394394 printf("\n");