Skip to content

Commit

Permalink
revert porting
Browse files Browse the repository at this point in the history
  • Loading branch information
majianjia committed Mar 23, 2019
1 parent c60e742 commit 329e361
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 52 deletions.
4 changes: 2 additions & 2 deletions SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ cwd = GetCurrentDir()
objs = []

objs += Glob('src/*.c')
CPPPATH=['%s/inc'%(cwd), '%s/port'%(cwd)]

try:
# here for as
Import('asenv')
MODULES = asenv['MODULES']
CPPPATH=['%s/inc'%(cwd), '%s/port/stdc'%(cwd)]

asenv.Append(CPPPATH = CPPPATH)

except:
# here for rt-thread
CPPPATH=['%s/inc'%(cwd), '%s/port/rt-thread'%(cwd)]
objs = DefineGroup('nnom', objs,
depend = ['PKG_USING_NNOM'],
CPPPATH = CPPPATH)
Expand Down
5 changes: 2 additions & 3 deletions port/stdc/nnom_port.h → port/nnom_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
* Jianjia Ma, Wearable Bio-Robotics Group (WBR)
* [email protected]
*
* This file (nnom_porting.h) is UNLICENSED, independently to NNoM.
*
*
* SPDX-License-Identifier: LGPL-3.0
*
* Change Logs:
* Date Author Notes
* 2019-02-05 Jianjia Ma The first version
Expand Down
43 changes: 0 additions & 43 deletions port/rt-thread/nnom_port.h

This file was deleted.

8 changes: 4 additions & 4 deletions src/nnom.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,10 @@ nnom_status_t compile_layers(nnom_layer_t *start, nnom_mem_block_t *block_pool)
else
compsize = 0;
// names
LOG(" %-10s - ", &default_layer_names[layer->type]);
LOG(" %-10s - ", default_layer_names[layer->type]);
// activations
if (layer->actail != NULL)
LOG("%-8s - ", &default_activation_names[layer->actail->type]);
LOG("%-8s - ", default_activation_names[layer->actail->type]);
else
LOG(" - ");

Expand Down Expand Up @@ -810,7 +810,7 @@ nnom_status_t model_compile(nnom_model_t *m, nnom_layer_t *input, nnom_layer_t *
// if model's tail is not the last layer which built by user.
if (output != find_last(input))
LOG("WARNING: model returned at #%d %s layer, but this layer is not the end of shortcut list \n",
find_index(m->head, output), &default_layer_names[output->type]);
find_index(m->head, output), default_layer_names[output->type]);

// get the total (aligned) memory requirement
buf_size = mem_analysis_result(m);
Expand Down Expand Up @@ -904,7 +904,7 @@ nnom_status_t model_run_to(nnom_model_t *m, nnom_layer_t *end_layer)
result = layer_run(layer);
if (result != NN_SUCCESS)
{
LOG("Error: #%d %s layer return error code:%d\n", layer_num, &default_layer_names[layer->type], result);
LOG("Error: #%d %s layer return error code:%d\n", layer_num, default_layer_names[layer->type], result);
return result;
}
#ifdef USE_NNOM_OUTPUT_SAVE
Expand Down

0 comments on commit 329e361

Please sign in to comment.