blob: 29ad97a538c8a4152e062d95a1c81bde27b175f4 [file] [log] [blame]
Kaizen8938bd32017-09-28 14:38:23 +01001var NAVTREE =
2[
3 [ "Compute Library", "index.xhtml", [
4 [ "Introduction", "index.xhtml", [
5 [ "Contact / Support", "index.xhtml#S0_1_contact", null ],
6 [ "File organisation", "index.xhtml#S1_file_organisation", null ],
7 [ "Release versions and changelog", "index.xhtml#S2_versions_changelog", [
8 [ "Release versions", "index.xhtml#S2_1_versions", null ],
9 [ "Changelog", "index.xhtml#S2_2_changelog", null ]
10 ] ],
11 [ "How to build the library and the examples", "index.xhtml#S3_how_to_build", [
12 [ "Build options", "index.xhtml#S3_1_build_options", null ],
13 [ "Building for Linux", "index.xhtml#S3_2_linux", [
14 [ "How to build the library ?", "index.xhtml#S3_2_1_library", null ],
15 [ "How to manually build the examples ?", "index.xhtml#S3_2_2_examples", null ]
16 ] ],
17 [ "Building for Android", "index.xhtml#S3_3_android", [
18 [ "How to build the library ?", "index.xhtml#S3_3_1_library", null ],
19 [ "How to manually build the examples ?", "index.xhtml#S3_3_2_examples", null ]
20 ] ],
Kaizenbf8b01d2017-10-12 14:26:51 +010021 [ "Building for bare metal", "index.xhtml#S3_4_bare_metal", [
22 [ "How to build the library ?", "index.xhtml#S3_4_1_library", null ],
23 [ "How to manually build the examples ?", "index.xhtml#S3_4_2_examples", null ]
Kaizen8938bd32017-09-28 14:38:23 +010024 ] ],
Kaizenbf8b01d2017-10-12 14:26:51 +010025 [ "Building on a Windows host system", "index.xhtml#S3_5_windows_host", [
26 [ "Bash on Ubuntu on Windows", "index.xhtml#S3_5_1_ubuntu_on_windows", null ],
27 [ "Cygwin", "index.xhtml#S3_5_2_cygwin", null ]
28 ] ],
29 [ "The OpenCL stub library", "index.xhtml#S3_6_cl_stub_library", null ]
Kaizen8938bd32017-09-28 14:38:23 +010030 ] ]
31 ] ],
32 [ "Library architecture", "architecture.xhtml", [
33 [ "Core vs Runtime libraries", "architecture.xhtml#S4_1", null ],
34 [ "Windows, kernels, multi-threading and functions", "architecture.xhtml#S4_2_windows_kernels_mt_functions", [
35 [ "Windows", "architecture.xhtml#S4_2_1_windows", null ],
36 [ "Kernels", "architecture.xhtml#S4_2_2", null ],
37 [ "Multi-threading", "architecture.xhtml#S4_2_3", null ],
38 [ "Functions", "architecture.xhtml#S4_2_4", null ],
39 [ "OpenCL Scheduler and kernel library", "architecture.xhtml#S4_4_1_cl_scheduler", null ],
40 [ "OpenCL events and synchronization", "architecture.xhtml#S4_4_2_events_sync", null ],
41 [ "OpenCL / NEON interoperability", "architecture.xhtml#S4_4_2_cl_neon", null ]
42 ] ],
43 [ "Algorithms", "architecture.xhtml#S4_5_algorithms", null ],
44 [ "Images, padding, border modes and tensors", "architecture.xhtml#S4_6_images_tensors", [
45 [ "Padding and border modes", "architecture.xhtml#S4_6_1_padding_and_border", [
46 [ "Padding", "architecture.xhtml#padding", null ],
47 [ "Valid regions", "architecture.xhtml#valid_region", null ]
48 ] ],
49 [ "Tensors", "architecture.xhtml#S4_6_2_tensors", null ],
50 [ "Images and Tensors description conventions", "architecture.xhtml#S4_6_3_description_conventions", null ],
51 [ "Working with Images and Tensors using iterators", "architecture.xhtml#S4_6_4_working_with_objects", null ]
52 ] ],
53 [ "MemoryManager", "architecture.xhtml#S4_7_memory_manager", [
54 [ "MemoryGroup, MemoryPool and MemoryManager Components", "architecture.xhtml#S4_7_1_memory_manager_components", [
55 [ "MemoryGroup", "architecture.xhtml#S4_7_1_1_memory_group", null ],
56 [ "MemoryPool", "architecture.xhtml#S4_7_1_2_memory_pool", null ],
57 [ "MemoryManager Components", "architecture.xhtml#S4_7_1_2_memory_manager_components", null ]
58 ] ],
59 [ "Working with the Memory Manager", "architecture.xhtml#S4_7_2_working_with_memory_manager", null ],
60 [ "Function support", "architecture.xhtml#S4_7_3_memory_manager_function_support", null ]
61 ] ]
62 ] ],
63 [ "Validation and benchmarks tests", "tests.xhtml", [
64 [ "Overview", "tests.xhtml#tests_overview", [
65 [ "Fixtures", "tests.xhtml#tests_overview_fixtures", [
66 [ "Fixture", "tests.xhtml#tests_overview_fixtures_fixture", null ],
67 [ "Data fixture", "tests.xhtml#tests_overview_fixtures_data_fixture", null ]
68 ] ],
69 [ "Test cases", "tests.xhtml#tests_overview_test_cases", [
70 [ "Test case", "tests.xhtml#tests_overview_test_cases_test_case", null ],
71 [ "Fixture test case", "tests.xhtml#tests_overview_test_cases_fixture_fixture_test_case", null ],
72 [ "Registering a fixture as test case", "tests.xhtml#tests_overview_test_cases_fixture_register_fixture_test_case", null ],
73 [ "Data test case", "tests.xhtml#tests_overview_test_cases_data_test_case", null ],
74 [ "Fixture data test case", "tests.xhtml#tests_overview_test_cases_fixture_data_test_case", null ],
75 [ "Registering a fixture as data test case", "tests.xhtml#tests_overview_test_cases_register_fixture_data_test_case", null ]
76 ] ]
77 ] ],
78 [ "Writing validation tests", "tests.xhtml#writing_tests", null ],
79 [ "Running tests", "tests.xhtml#tests_running_tests", [
80 [ "Benchmarking", "tests.xhtml#tests_running_tests_benchmarking", [
81 [ "Filter tests", "tests.xhtml#tests_running_tests_benchmarking_filter", null ],
82 [ "Runtime", "tests.xhtml#tests_running_tests_benchmarking_runtime", null ],
Kaizenbf8b01d2017-10-12 14:26:51 +010083 [ "Output", "tests.xhtml#tests_running_tests_benchmarking_output", null ],
84 [ "Mode", "tests.xhtml#tests_running_tests_benchmarking_mode", null ],
85 [ "Instruments", "tests.xhtml#tests_running_tests_benchmarking_instruments", null ]
Kaizen8938bd32017-09-28 14:38:23 +010086 ] ],
87 [ "Validation", "tests.xhtml#tests_running_tests_validation", null ]
88 ] ]
89 ] ],
90 [ "Importing data from existing models", "data_import.xhtml", [
91 [ "Extract data from pre-trained caffe model", "data_import.xhtml#caffe_data_extractor", [
92 [ "How to use the script", "data_import.xhtml#caffe_how_to", null ],
93 [ "What is the expected output from the script", "data_import.xhtml#caffe_result", null ]
94 ] ],
95 [ "Extract data from pre-trained tensorflow model", "data_import.xhtml#tensorflow_data_extractor", [
96 [ "How to use the script", "data_import.xhtml#tensorflow_how_to", null ],
97 [ "What is the expected output from the script", "data_import.xhtml#tensorflow_result", null ]
98 ] ]
99 ] ],
100 [ "Namespaces", null, [
101 [ "Namespace List", "namespaces.xhtml", "namespaces" ],
102 [ "Namespace Members", "namespacemembers.xhtml", [
103 [ "All", "namespacemembers.xhtml", "namespacemembers_dup" ],
104 [ "Functions", "namespacemembers_func.xhtml", "namespacemembers_func" ],
105 [ "Variables", "namespacemembers_vars.xhtml", null ],
106 [ "Typedefs", "namespacemembers_type.xhtml", "namespacemembers_type" ],
107 [ "Enumerations", "namespacemembers_enum.xhtml", null ],
108 [ "Enumerator", "namespacemembers_eval.xhtml", null ]
109 ] ]
110 ] ],
111 [ "Data Structures", null, [
112 [ "Data Structures", "annotated.xhtml", "annotated" ],
113 [ "Data Structure Index", "classes.xhtml", null ],
114 [ "Class Hierarchy", "hierarchy.xhtml", "hierarchy" ],
115 [ "Data Fields", "functions.xhtml", [
116 [ "All", "functions.xhtml", "functions_dup" ],
117 [ "Functions", "functions_func.xhtml", "functions_func" ],
118 [ "Variables", "functions_vars.xhtml", "functions_vars" ],
119 [ "Typedefs", "functions_type.xhtml", null ],
120 [ "Enumerations", "functions_enum.xhtml", null ],
121 [ "Enumerator", "functions_eval.xhtml", null ],
122 [ "Related Functions", "functions_rela.xhtml", null ]
123 ] ]
124 ] ],
125 [ "Files", null, [
126 [ "File List", "files.xhtml", "files" ],
127 [ "Globals", "globals.xhtml", [
128 [ "All", "globals.xhtml", "globals_dup" ],
129 [ "Functions", "globals_func.xhtml", "globals_func" ],
130 [ "Variables", "globals_vars.xhtml", null ],
131 [ "Typedefs", "globals_type.xhtml", null ],
132 [ "Macros", "globals_defs.xhtml", "globals_defs" ]
133 ] ]
134 ] ]
135 ] ]
136];
137
138var NAVTREEINDEX =
139[
140"_access_window_auto_padding_8h.xhtml",
Kaizenbf8b01d2017-10-12 14:26:51 +0100141"_c_l_2_global_pooling_layer_8cpp.xhtml",
142"_c_l_depthwise_im2_col_kernel_8h_source.xhtml",
143"_c_l_softmax_layer_8h_source.xhtml",
144"_coordinates_8h_source.xhtml",
145"_helpers_8cpp.xhtml",
146"_macros_8h.xhtml#ad05271218a1dc0111d1b07ecd8f94904",
147"_n_e_fixed_point_8h.xhtml#a5db8c0cf0dba918904733f0c9a8bedc8",
148"_n_e_g_e_m_m_8h.xhtml",
149"_n_e_o_n_2_depth_convert_8cpp.xhtml#ab683f67d5db4ac9155889c52a1a1dde8",
150"_n_e_softmax_layer_kernel_8h.xhtml",
151"_type_printer_8h.xhtml#a2c0e6c1c4cf10da25e7a7362ba151ba2",
152"arm__compute_2core_2_fixed_point_8h.xhtml#a217e5c603560d6f73971983c6d1572a1",
153"asmlib_8hpp.xhtml#a262a34c328c613ca472b4a07450cd259",
154"caffe__data__extractor_8py_source.xhtml",
155"classarm__compute_1_1_c_l_bitwise_xor_kernel.xhtml",
156"classarm__compute_1_1_c_l_fast_corners.xhtml#a5376467035ae425342d9feb333452d07",
157"classarm__compute_1_1_c_l_histogram_border_kernel.xhtml#a406ea1342bf3679752ba91525c59aaf6",
158"classarm__compute_1_1_c_l_pixel_wise_multiplication.xhtml#a3e0a2f39d9dc0f7083aef3b37335afff",
159"classarm__compute_1_1_c_l_symbols.xhtml#acf6ea30fe76b4d9cbd9e05aa3ed19fa2",
160"classarm__compute_1_1_i_c_l_multi_image.xhtml#ad136a4299cb6e978ab975fe4a4691fba",
161"classarm__compute_1_1_memory_manager_on_demand.xhtml#a068c36b905736af9b9752c5b8b301d27",
162"classarm__compute_1_1_n_e_cumulative_distribution_kernel.xhtml#afa30a9b7652a405442adaed49119a323",
163"classarm__compute_1_1_n_e_gaussian5x5_hor_kernel.xhtml#a165cde4f51d6dc5cb425237cdf7535a4",
164"classarm__compute_1_1_n_e_min_max_kernel.xhtml#a6838da666c340e4d73e8779d710a2dfd",
165"classarm__compute_1_1_n_e_sobel7x7_vert_kernel.xhtml#a667242192107c5f9fb8368eaccca2103",
166"classarm__compute_1_1_tensor_info.xhtml#a4b7391b7025befbe44b743723feb4a9b",
167"classarm__compute_1_1test_1_1_assets_library.xhtml#a5ee4fc10b84f941236df524f618b96c6",
168"classarm__compute_1_1test_1_1datasets_1_1_fully_connected_layer_dataset.xhtml#a5446368b6d98e0124488be5698abf97a",
169"classarm__compute_1_1test_1_1framework_1_1_framework.xhtml#ab3e6a123f1a0717364f2bfe9e2dbaedf",
170"classarm__compute_1_1test_1_1validation_1_1_batch_normalization_layer_validation_fixed_point_fixture.xhtml",
171"dir_463ebbf2abb1a8cd3e39ae1d0da97cb5.xhtml",
172"fixed__point_8h.xhtml#ae391ff83d53deb586074fdad54f59d9b",
173"helpers_8h.xhtml#a4e0fc93c9a69863dcdf7672ab547026c",
174"namespacemembers_func_o.xhtml",
175"struct_internal_keypoint.xhtml#aa4f0d3eebc3c443f9be81bf48561a217",
176"structarm__compute_1_1test_1_1framework_1_1dataset_1_1_cartesian_product_dataset_1_1iterator.xhtml#af1b1c7856a59f34c7d3570f946a2ff00",
177"tests_2validation_2_c_p_p_2_pooling_layer_8h.xhtml#a9b408e7726bf08bb8bb9a289ee622df3",
178"validation_2_c_p_p_2_depthwise_convolution_8cpp.xhtml"
Kaizen8938bd32017-09-28 14:38:23 +0100179];
180
181var SYNCONMSG = 'click to disable panel synchronisation';
182var SYNCOFFMSG = 'click to enable panel synchronisation';
183var SYNCONMSG = 'click to disable panel synchronisation';
184var SYNCOFFMSG = 'click to enable panel synchronisation';
Anthony Barbier871448e2017-03-24 14:54:29 +0000185var navTreeSubIndices = new Array();
186
187function getData(varName)
188{
189 var i = varName.lastIndexOf('/');
190 var n = i>=0 ? varName.substring(i+1) : varName;
191 return eval(n.replace(/\-/g,'_'));
192}
193
194function stripPath(uri)
195{
196 return uri.substring(uri.lastIndexOf('/')+1);
197}
198
199function stripPath2(uri)
200{
201 var i = uri.lastIndexOf('/');
202 var s = uri.substring(i+1);
203 var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
204 return m ? uri.substring(i-6) : s;
205}
206
Anthony Barbier871448e2017-03-24 14:54:29 +0000207function localStorageSupported()
208{
209 try {
210 return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
211 }
212 catch(e) {
213 return false;
214 }
215}
216
217
218function storeLink(link)
219{
220 if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
221 window.localStorage.setItem('navpath',link);
222 }
223}
224
225function deleteLink()
226{
227 if (localStorageSupported()) {
228 window.localStorage.setItem('navpath','');
Kaizen8938bd32017-09-28 14:38:23 +0100229 }
Anthony Barbier871448e2017-03-24 14:54:29 +0000230}
231
232function cachedLink()
233{
234 if (localStorageSupported()) {
235 return window.localStorage.getItem('navpath');
236 } else {
237 return '';
238 }
239}
240
241function getScript(scriptName,func,show)
242{
243 var head = document.getElementsByTagName("head")[0];
244 var script = document.createElement('script');
245 script.id = scriptName;
246 script.type = 'text/javascript';
247 script.onload = func;
248 script.src = scriptName+'.js';
249 if ($.browser.msie && $.browser.version<=8) {
250 // script.onload does not work with older versions of IE
251 script.onreadystatechange = function() {
252 if (script.readyState=='complete' || script.readyState=='loaded') {
253 func(); if (show) showRoot();
254 }
255 }
256 }
257 head.appendChild(script);
258}
259
260function createIndent(o,domNode,node,level)
261{
262 var level=-1;
263 var n = node;
264 while (n.parentNode) { level++; n=n.parentNode; }
265 if (node.childrenData) {
266 var imgNode = document.createElement("img");
267 imgNode.style.paddingLeft=(16*level).toString()+'px';
268 imgNode.width = 16;
269 imgNode.height = 22;
270 imgNode.border = 0;
271 node.plus_img = imgNode;
272 node.expandToggle = document.createElement("a");
273 node.expandToggle.href = "javascript:void(0)";
274 node.expandToggle.onclick = function() {
275 if (node.expanded) {
276 $(node.getChildrenUL()).slideUp("fast");
Kaizen8938bd32017-09-28 14:38:23 +0100277 node.plus_img.src = node.relpath+"ftv2pnode.png";
Anthony Barbier871448e2017-03-24 14:54:29 +0000278 node.expanded = false;
279 } else {
280 expandNode(o, node, false, false);
281 }
282 }
283 node.expandToggle.appendChild(imgNode);
284 domNode.appendChild(node.expandToggle);
Kaizen8938bd32017-09-28 14:38:23 +0100285 imgNode.src = node.relpath+"ftv2pnode.png";
Anthony Barbier871448e2017-03-24 14:54:29 +0000286 } else {
287 var span = document.createElement("span");
288 span.style.display = 'inline-block';
289 span.style.width = 16*(level+1)+'px';
290 span.style.height = '22px';
291 span.innerHTML = '&#160;';
292 domNode.appendChild(span);
293 }
294}
295
296var animationInProgress = false;
297
298function gotoAnchor(anchor,aname,updateLocation)
299{
300 var pos, docContent = $('#doc-content');
Kaizen8938bd32017-09-28 14:38:23 +0100301 if (anchor.parent().attr('class')=='memItemLeft' ||
302 anchor.parent().attr('class')=='fieldtype' ||
303 anchor.parent().is(':header'))
Anthony Barbier871448e2017-03-24 14:54:29 +0000304 {
Kaizen8938bd32017-09-28 14:38:23 +0100305 pos = anchor.parent().position().top;
Anthony Barbier871448e2017-03-24 14:54:29 +0000306 } else if (anchor.position()) {
307 pos = anchor.position().top;
308 }
309 if (pos) {
310 var dist = Math.abs(Math.min(
311 pos-docContent.offset().top,
312 docContent[0].scrollHeight-
313 docContent.height()-docContent.scrollTop()));
314 animationInProgress=true;
315 docContent.animate({
316 scrollTop: pos + docContent.scrollTop() - docContent.offset().top
317 },Math.max(50,Math.min(500,dist)),function(){
318 if (updateLocation) window.location.href=aname;
319 animationInProgress=false;
320 });
321 }
322}
323
324function newNode(o, po, text, link, childrenData, lastNode)
325{
326 var node = new Object();
327 node.children = Array();
328 node.childrenData = childrenData;
329 node.depth = po.depth + 1;
330 node.relpath = po.relpath;
331 node.isLast = lastNode;
332
333 node.li = document.createElement("li");
334 po.getChildrenUL().appendChild(node.li);
335 node.parentNode = po;
336
337 node.itemDiv = document.createElement("div");
338 node.itemDiv.className = "item";
339
340 node.labelSpan = document.createElement("span");
341 node.labelSpan.className = "label";
342
343 createIndent(o,node.itemDiv,node,0);
344 node.itemDiv.appendChild(node.labelSpan);
345 node.li.appendChild(node.itemDiv);
346
347 var a = document.createElement("a");
348 node.labelSpan.appendChild(a);
349 node.label = document.createTextNode(text);
350 node.expanded = false;
351 a.appendChild(node.label);
352 if (link) {
353 var url;
354 if (link.substring(0,1)=='^') {
355 url = link.substring(1);
356 link = url;
357 } else {
358 url = node.relpath+link;
359 }
360 a.className = stripPath(link.replace('#',':'));
361 if (link.indexOf('#')!=-1) {
362 var aname = '#'+link.split('#')[1];
Kaizen8938bd32017-09-28 14:38:23 +0100363 var srcPage = stripPath($(location).attr('pathname'));
Anthony Barbier871448e2017-03-24 14:54:29 +0000364 var targetPage = stripPath(link.split('#')[0]);
365 a.href = srcPage!=targetPage ? url : "javascript:void(0)";
366 a.onclick = function(){
367 storeLink(link);
368 if (!$(a).parent().parent().hasClass('selected'))
369 {
370 $('.item').removeClass('selected');
371 $('.item').removeAttr('id');
372 $(a).parent().parent().addClass('selected');
373 $(a).parent().parent().attr('id','selected');
374 }
375 var anchor = $(aname);
376 gotoAnchor(anchor,aname,true);
377 };
378 } else {
379 a.href = url;
380 a.onclick = function() { storeLink(link); }
381 }
382 } else {
383 if (childrenData != null)
384 {
385 a.className = "nolink";
386 a.href = "javascript:void(0)";
387 a.onclick = node.expandToggle.onclick;
388 }
389 }
390
391 node.childrenUL = null;
392 node.getChildrenUL = function() {
393 if (!node.childrenUL) {
394 node.childrenUL = document.createElement("ul");
395 node.childrenUL.className = "children_ul";
396 node.childrenUL.style.display = "none";
397 node.li.appendChild(node.childrenUL);
398 }
399 return node.childrenUL;
400 };
401
402 return node;
403}
404
405function showRoot()
406{
407 var headerHeight = $("#top").height();
408 var footerHeight = $("#nav-path").height();
409 var windowHeight = $(window).height() - headerHeight - footerHeight;
410 (function (){ // retry until we can scroll to the selected item
411 try {
412 var navtree=$('#nav-tree');
413 navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
414 } catch (err) {
415 setTimeout(arguments.callee, 0);
416 }
417 })();
418}
419
420function expandNode(o, node, imm, showRoot)
421{
422 if (node.childrenData && !node.expanded) {
423 if (typeof(node.childrenData)==='string') {
424 var varName = node.childrenData;
425 getScript(node.relpath+varName,function(){
426 node.childrenData = getData(varName);
427 expandNode(o, node, imm, showRoot);
428 }, showRoot);
429 } else {
430 if (!node.childrenVisited) {
431 getNode(o, node);
432 } if (imm || ($.browser.msie && $.browser.version>8)) {
433 // somehow slideDown jumps to the start of tree for IE9 :-(
434 $(node.getChildrenUL()).show();
435 } else {
436 $(node.getChildrenUL()).slideDown("fast");
437 }
438 if (node.isLast) {
Kaizen8938bd32017-09-28 14:38:23 +0100439 node.plus_img.src = node.relpath+"ftv2mlastnode.png";
Anthony Barbier871448e2017-03-24 14:54:29 +0000440 } else {
Kaizen8938bd32017-09-28 14:38:23 +0100441 node.plus_img.src = node.relpath+"ftv2mnode.png";
Anthony Barbier871448e2017-03-24 14:54:29 +0000442 }
443 node.expanded = true;
444 }
445 }
446}
447
448function glowEffect(n,duration)
449{
450 n.addClass('glow').delay(duration).queue(function(next){
451 $(this).removeClass('glow');next();
452 });
453}
454
455function highlightAnchor()
456{
Kaizen8938bd32017-09-28 14:38:23 +0100457 var aname = $(location).attr('hash');
Anthony Barbier871448e2017-03-24 14:54:29 +0000458 var anchor = $(aname);
459 if (anchor.parent().attr('class')=='memItemLeft'){
Kaizen8938bd32017-09-28 14:38:23 +0100460 var rows = $('.memberdecls tr[class$="'+
461 window.location.hash.substring(1)+'"]');
Anthony Barbier871448e2017-03-24 14:54:29 +0000462 glowEffect(rows.children(),300); // member without details
Kaizen8938bd32017-09-28 14:38:23 +0100463 } else if (anchor.parents().slice(2).prop('tagName')=='TR') {
464 glowEffect(anchor.parents('div.memitem'),1000); // enum value
Anthony Barbier871448e2017-03-24 14:54:29 +0000465 } else if (anchor.parent().attr('class')=='fieldtype'){
466 glowEffect(anchor.parent().parent(),1000); // struct field
467 } else if (anchor.parent().is(":header")) {
468 glowEffect(anchor.parent(),1000); // section header
469 } else {
470 glowEffect(anchor.next(),1000); // normal member
471 }
472 gotoAnchor(anchor,aname,false);
473}
474
475function selectAndHighlight(hash,n)
476{
477 var a;
478 if (hash) {
Kaizen8938bd32017-09-28 14:38:23 +0100479 var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1);
Anthony Barbier871448e2017-03-24 14:54:29 +0000480 a=$('.item a[class$="'+link+'"]');
481 }
482 if (a && a.length) {
483 a.parent().parent().addClass('selected');
484 a.parent().parent().attr('id','selected');
485 highlightAnchor();
486 } else if (n) {
487 $(n.itemDiv).addClass('selected');
488 $(n.itemDiv).attr('id','selected');
489 }
490 if ($('#nav-tree-contents .item:first').hasClass('selected')) {
491 $('#nav-sync').css('top','30px');
492 } else {
493 $('#nav-sync').css('top','5px');
494 }
495 showRoot();
496}
497
498function showNode(o, node, index, hash)
499{
500 if (node && node.childrenData) {
501 if (typeof(node.childrenData)==='string') {
502 var varName = node.childrenData;
503 getScript(node.relpath+varName,function(){
504 node.childrenData = getData(varName);
505 showNode(o,node,index,hash);
506 },true);
507 } else {
508 if (!node.childrenVisited) {
509 getNode(o, node);
510 }
511 $(node.getChildrenUL()).css({'display':'block'});
Kaizen8938bd32017-09-28 14:38:23 +0100512 if (node.isLast) {
513 node.plus_img.src = node.relpath+"ftv2mlastnode.png";
514 } else {
515 node.plus_img.src = node.relpath+"ftv2mnode.png";
516 }
Anthony Barbier871448e2017-03-24 14:54:29 +0000517 node.expanded = true;
518 var n = node.children[o.breadcrumbs[index]];
519 if (index+1<o.breadcrumbs.length) {
520 showNode(o,n,index+1,hash);
521 } else {
522 if (typeof(n.childrenData)==='string') {
523 var varName = n.childrenData;
524 getScript(n.relpath+varName,function(){
525 n.childrenData = getData(varName);
526 node.expanded=false;
527 showNode(o,node,index,hash); // retry with child node expanded
528 },true);
529 } else {
530 var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
531 if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
532 expandNode(o, n, true, true);
533 }
534 selectAndHighlight(hash,n);
535 }
536 }
537 }
538 } else {
539 selectAndHighlight(hash);
540 }
541}
542
543function removeToInsertLater(element) {
544 var parentNode = element.parentNode;
545 var nextSibling = element.nextSibling;
546 parentNode.removeChild(element);
547 return function() {
548 if (nextSibling) {
549 parentNode.insertBefore(element, nextSibling);
550 } else {
551 parentNode.appendChild(element);
552 }
553 };
554}
555
556function getNode(o, po)
557{
558 var insertFunction = removeToInsertLater(po.li);
559 po.childrenVisited = true;
560 var l = po.childrenData.length-1;
561 for (var i in po.childrenData) {
562 var nodeData = po.childrenData[i];
563 po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
564 i==l);
565 }
566 insertFunction();
567}
568
569function gotoNode(o,subIndex,root,hash,relpath)
570{
571 var nti = navTreeSubIndices[subIndex][root+hash];
572 o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
573 if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
574 navTo(o,NAVTREE[0][1],"",relpath);
575 $('.item').removeClass('selected');
576 $('.item').removeAttr('id');
577 }
578 if (o.breadcrumbs) {
579 o.breadcrumbs.unshift(0); // add 0 for root node
580 showNode(o, o.node, 0, hash);
581 }
582}
583
584function navTo(o,root,hash,relpath)
585{
586 var link = cachedLink();
587 if (link) {
588 var parts = link.split('#');
589 root = parts[0];
Kaizen8938bd32017-09-28 14:38:23 +0100590 if (parts.length>1) hash = '#'+parts[1];
Anthony Barbier871448e2017-03-24 14:54:29 +0000591 else hash='';
592 }
593 if (hash.match(/^#l\d+$/)) {
594 var anchor=$('a[name='+hash.substring(1)+']');
595 glowEffect(anchor.parent(),1000); // line number
596 hash=''; // strip line number anchors
Kaizen8938bd32017-09-28 14:38:23 +0100597 //root=root.replace(/_source\./,'.'); // source link to doc link
Anthony Barbier871448e2017-03-24 14:54:29 +0000598 }
599 var url=root+hash;
600 var i=-1;
601 while (NAVTREEINDEX[i+1]<=url) i++;
602 if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
603 if (navTreeSubIndices[i]) {
604 gotoNode(o,i,root,hash,relpath)
605 } else {
606 getScript(relpath+'navtreeindex'+i,function(){
607 navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
608 if (navTreeSubIndices[i]) {
609 gotoNode(o,i,root,hash,relpath);
610 }
611 },true);
612 }
613}
614
615function showSyncOff(n,relpath)
616{
617 n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
618}
619
620function showSyncOn(n,relpath)
621{
622 n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
623}
624
625function toggleSyncButton(relpath)
626{
627 var navSync = $('#nav-sync');
628 if (navSync.hasClass('sync')) {
629 navSync.removeClass('sync');
630 showSyncOff(navSync,relpath);
Kaizen8938bd32017-09-28 14:38:23 +0100631 storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash'));
Anthony Barbier871448e2017-03-24 14:54:29 +0000632 } else {
633 navSync.addClass('sync');
634 showSyncOn(navSync,relpath);
635 deleteLink();
636 }
637}
638
639function initNavTree(toroot,relpath)
640{
641 var o = new Object();
642 o.toroot = toroot;
643 o.node = new Object();
644 o.node.li = document.getElementById("nav-tree-contents");
645 o.node.childrenData = NAVTREE;
646 o.node.children = new Array();
647 o.node.childrenUL = document.createElement("ul");
648 o.node.getChildrenUL = function() { return o.node.childrenUL; };
649 o.node.li.appendChild(o.node.childrenUL);
650 o.node.depth = 0;
651 o.node.relpath = relpath;
652 o.node.expanded = false;
653 o.node.isLast = true;
654 o.node.plus_img = document.createElement("img");
Kaizen8938bd32017-09-28 14:38:23 +0100655 o.node.plus_img.src = relpath+"ftv2pnode.png";
Anthony Barbier871448e2017-03-24 14:54:29 +0000656 o.node.plus_img.width = 16;
657 o.node.plus_img.height = 22;
658
659 if (localStorageSupported()) {
660 var navSync = $('#nav-sync');
661 if (cachedLink()) {
662 showSyncOff(navSync,relpath);
663 navSync.removeClass('sync');
664 } else {
665 showSyncOn(navSync,relpath);
666 }
667 navSync.click(function(){ toggleSyncButton(relpath); });
668 }
669
670 $(window).load(function(){
Kaizen8938bd32017-09-28 14:38:23 +0100671 navTo(o,toroot,window.location.hash,relpath);
Anthony Barbier871448e2017-03-24 14:54:29 +0000672 showRoot();
673 });
674
675 $(window).bind('hashchange', function(){
676 if (window.location.hash && window.location.hash.length>1){
677 var a;
678 if ($(location).attr('hash')){
Kaizen8938bd32017-09-28 14:38:23 +0100679 var clslink=stripPath($(location).attr('pathname'))+':'+
680 $(location).attr('hash').substring(1);
681 a=$('.item a[class$="'+clslink+'"]');
Anthony Barbier871448e2017-03-24 14:54:29 +0000682 }
683 if (a==null || !$(a).parent().parent().hasClass('selected')){
684 $('.item').removeClass('selected');
685 $('.item').removeAttr('id');
686 }
Kaizen8938bd32017-09-28 14:38:23 +0100687 var link=stripPath2($(location).attr('pathname'));
688 navTo(o,link,$(location).attr('hash'),relpath);
Anthony Barbier871448e2017-03-24 14:54:29 +0000689 } else if (!animationInProgress) {
690 $('#doc-content').scrollTop(0);
691 $('.item').removeClass('selected');
692 $('.item').removeAttr('id');
Kaizen8938bd32017-09-28 14:38:23 +0100693 navTo(o,toroot,window.location.hash,relpath);
Anthony Barbier871448e2017-03-24 14:54:29 +0000694 }
695 })
696}
697