| var NAVTREE = |
| [ |
| [ "Compute Library", "index.xhtml", [ |
| [ "Introduction", "index.xhtml", [ |
| [ "Contact / Support", "index.xhtml#S0_1_contact", null ], |
| [ "File organisation", "index.xhtml#S1_file_organisation", null ], |
| [ "Release versions and changelog", "index.xhtml#S2_versions_changelog", [ |
| [ "Release versions", "index.xhtml#S2_1_versions", null ], |
| [ "Changelog", "index.xhtml#S2_2_changelog", null ] |
| ] ], |
| [ "How to build the library and the examples", "index.xhtml#S3_how_to_build", [ |
| [ "Build options", "index.xhtml#S3_1_build_options", null ], |
| [ "Building for Linux", "index.xhtml#S3_2_linux", [ |
| [ "How to build the library ?", "index.xhtml#S3_2_1_library", null ], |
| [ "How to manually build the examples ?", "index.xhtml#S3_2_2_examples", null ] |
| ] ], |
| [ "Building for Android", "index.xhtml#S3_3_android", [ |
| [ "How to build the library ?", "index.xhtml#S3_3_1_library", null ], |
| [ "How to manually build the examples ?", "index.xhtml#S3_3_2_examples", null ] |
| ] ], |
| [ "Building on a Windows host system", "index.xhtml#S3_4_windows_host", [ |
| [ "Bash on Ubuntu on Windows", "index.xhtml#S3_4_1_ubuntu_on_windows", null ], |
| [ "Cygwin", "index.xhtml#S3_4_2_cygwin", null ] |
| ] ], |
| [ "The OpenCL stub library", "index.xhtml#S3_5_cl_stub_library", null ] |
| ] ] |
| ] ], |
| [ "Library architecture", "architecture.xhtml", [ |
| [ "Core vs Runtime libraries", "architecture.xhtml#S4_1", null ], |
| [ "Windows, kernels, multi-threading and functions", "architecture.xhtml#S4_2_windows_kernels_mt_functions", [ |
| [ "Windows", "architecture.xhtml#S4_2_1_windows", null ], |
| [ "Kernels", "architecture.xhtml#S4_2_2", null ], |
| [ "Multi-threading", "architecture.xhtml#S4_2_3", null ], |
| [ "Functions", "architecture.xhtml#S4_2_4", null ], |
| [ "OpenCL Scheduler and kernel library", "architecture.xhtml#S4_4_1_cl_scheduler", null ], |
| [ "OpenCL events and synchronization", "architecture.xhtml#S4_4_2_events_sync", null ], |
| [ "OpenCL / NEON interoperability", "architecture.xhtml#S4_4_2_cl_neon", null ] |
| ] ], |
| [ "Algorithms", "architecture.xhtml#S4_5_algorithms", null ], |
| [ "Images, padding, border modes and tensors", "architecture.xhtml#S4_6_images_tensors", [ |
| [ "Padding and border modes", "architecture.xhtml#S4_6_1_padding_and_border", [ |
| [ "Padding", "architecture.xhtml#padding", null ], |
| [ "Valid regions", "architecture.xhtml#valid_region", null ] |
| ] ], |
| [ "Tensors", "architecture.xhtml#S4_6_2_tensors", null ], |
| [ "Images and Tensors description conventions", "architecture.xhtml#S4_6_3_description_conventions", null ], |
| [ "Working with Images and Tensors using iterators", "architecture.xhtml#S4_6_4_working_with_objects", null ] |
| ] ], |
| [ "MemoryManager", "architecture.xhtml#S4_7_memory_manager", [ |
| [ "MemoryGroup, MemoryPool and MemoryManager Components", "architecture.xhtml#S4_7_1_memory_manager_components", [ |
| [ "MemoryGroup", "architecture.xhtml#S4_7_1_1_memory_group", null ], |
| [ "MemoryPool", "architecture.xhtml#S4_7_1_2_memory_pool", null ], |
| [ "MemoryManager Components", "architecture.xhtml#S4_7_1_2_memory_manager_components", null ] |
| ] ], |
| [ "Working with the Memory Manager", "architecture.xhtml#S4_7_2_working_with_memory_manager", null ], |
| [ "Function support", "architecture.xhtml#S4_7_3_memory_manager_function_support", null ] |
| ] ] |
| ] ], |
| [ "Validation and benchmarks tests", "tests.xhtml", [ |
| [ "Overview", "tests.xhtml#tests_overview", [ |
| [ "Fixtures", "tests.xhtml#tests_overview_fixtures", [ |
| [ "Fixture", "tests.xhtml#tests_overview_fixtures_fixture", null ], |
| [ "Data fixture", "tests.xhtml#tests_overview_fixtures_data_fixture", null ] |
| ] ], |
| [ "Test cases", "tests.xhtml#tests_overview_test_cases", [ |
| [ "Test case", "tests.xhtml#tests_overview_test_cases_test_case", null ], |
| [ "Fixture test case", "tests.xhtml#tests_overview_test_cases_fixture_fixture_test_case", null ], |
| [ "Registering a fixture as test case", "tests.xhtml#tests_overview_test_cases_fixture_register_fixture_test_case", null ], |
| [ "Data test case", "tests.xhtml#tests_overview_test_cases_data_test_case", null ], |
| [ "Fixture data test case", "tests.xhtml#tests_overview_test_cases_fixture_data_test_case", null ], |
| [ "Registering a fixture as data test case", "tests.xhtml#tests_overview_test_cases_register_fixture_data_test_case", null ] |
| ] ] |
| ] ], |
| [ "Writing validation tests", "tests.xhtml#writing_tests", null ], |
| [ "Running tests", "tests.xhtml#tests_running_tests", [ |
| [ "Benchmarking", "tests.xhtml#tests_running_tests_benchmarking", [ |
| [ "Filter tests", "tests.xhtml#tests_running_tests_benchmarking_filter", null ], |
| [ "Runtime", "tests.xhtml#tests_running_tests_benchmarking_runtime", null ], |
| [ "Output", "tests.xhtml#tests_running_tests_benchmarking_output", null ] |
| ] ], |
| [ "Validation", "tests.xhtml#tests_running_tests_validation", null ] |
| ] ] |
| ] ], |
| [ "Importing data from existing models", "data_import.xhtml", [ |
| [ "Extract data from pre-trained caffe model", "data_import.xhtml#caffe_data_extractor", [ |
| [ "How to use the script", "data_import.xhtml#caffe_how_to", null ], |
| [ "What is the expected output from the script", "data_import.xhtml#caffe_result", null ] |
| ] ], |
| [ "Extract data from pre-trained tensorflow model", "data_import.xhtml#tensorflow_data_extractor", [ |
| [ "How to use the script", "data_import.xhtml#tensorflow_how_to", null ], |
| [ "What is the expected output from the script", "data_import.xhtml#tensorflow_result", null ] |
| ] ] |
| ] ], |
| [ "Namespaces", null, [ |
| [ "Namespace List", "namespaces.xhtml", "namespaces" ], |
| [ "Namespace Members", "namespacemembers.xhtml", [ |
| [ "All", "namespacemembers.xhtml", "namespacemembers_dup" ], |
| [ "Functions", "namespacemembers_func.xhtml", "namespacemembers_func" ], |
| [ "Variables", "namespacemembers_vars.xhtml", null ], |
| [ "Typedefs", "namespacemembers_type.xhtml", "namespacemembers_type" ], |
| [ "Enumerations", "namespacemembers_enum.xhtml", null ], |
| [ "Enumerator", "namespacemembers_eval.xhtml", null ] |
| ] ] |
| ] ], |
| [ "Data Structures", null, [ |
| [ "Data Structures", "annotated.xhtml", "annotated" ], |
| [ "Data Structure Index", "classes.xhtml", null ], |
| [ "Class Hierarchy", "hierarchy.xhtml", "hierarchy" ], |
| [ "Data Fields", "functions.xhtml", [ |
| [ "All", "functions.xhtml", "functions_dup" ], |
| [ "Functions", "functions_func.xhtml", "functions_func" ], |
| [ "Variables", "functions_vars.xhtml", "functions_vars" ], |
| [ "Typedefs", "functions_type.xhtml", null ], |
| [ "Enumerations", "functions_enum.xhtml", null ], |
| [ "Enumerator", "functions_eval.xhtml", null ], |
| [ "Related Functions", "functions_rela.xhtml", null ] |
| ] ] |
| ] ], |
| [ "Files", null, [ |
| [ "File List", "files.xhtml", "files" ], |
| [ "Globals", "globals.xhtml", [ |
| [ "All", "globals.xhtml", "globals_dup" ], |
| [ "Functions", "globals_func.xhtml", "globals_func" ], |
| [ "Variables", "globals_vars.xhtml", null ], |
| [ "Typedefs", "globals_type.xhtml", null ], |
| [ "Macros", "globals_defs.xhtml", "globals_defs" ] |
| ] ] |
| ] ] |
| ] ] |
| ]; |
| |
| var NAVTREEINDEX = |
| [ |
| "_access_window_auto_padding_8h.xhtml", |
| "_c_l_2_l2_normalize_8cpp.xhtml#a73e3a821b37933eebdf70b9e61d5a156", |
| "_c_l_fast_corners_8h_source.xhtml", |
| "_c_l_types_8h.xhtml#a735ac6c2a02e320969625308810444f3a0a91b0ff027767625b7d1a924e10c298", |
| "_direct_convolution_layer_dataset_8h_source.xhtml", |
| "_i_c_l_kernel_8h.xhtml", |
| "_n_e_activation_layer_8h.xhtml", |
| "_n_e_fixed_point_8h.xhtml#ac2edef8bf07bce91b37aa02b952b8ed6", |
| "_n_e_l2_normalize_8h_source.xhtml", |
| "_n_e_o_n_2_min_max_location_8cpp.xhtml#af8115bb60734e2ad3cc20b8f73b74cd8", |
| "_range_dataset_8h.xhtml#a79a0f3a3229c216adf314eb6030d6e24", |
| "_window_8inl.xhtml", |
| "arm__compute_2core_2_types_8h.xhtml#ab4e88c89b3b7ea1735996cc4def22d58af557448a61ad2927194f63442e131dfa", |
| "benchmark_2_n_e_o_n_2_convolution_layer_8cpp.xhtml#a7da7dbada8d8e076c78d1402743b7de9", |
| "classarm__compute_1_1_c_l_absolute_difference.xhtml#af53d66a8f8dd368d3c06b43c0c6a12f1", |
| "classarm__compute_1_1_c_l_depthwise_im2_col_kernel.xhtml#a0a10e55699b26afdf2fbf336dc9cad09", |
| "classarm__compute_1_1_c_l_gaussian_pyramid_orb.xhtml#a3039d9b3acf6992402f841a9290338f9", |
| "classarm__compute_1_1_c_l_magnitude_phase_kernel.xhtml#a26b6db53a3b87bcf6476d95d45dff938", |
| "classarm__compute_1_1_c_l_sobel5x5_hor_kernel.xhtml#ab24f49526202babfe7df925cd326427b", |
| "classarm__compute_1_1_h_o_g_info.xhtml#a8f6435e0a7c016e3cb0fc94b33067e50", |
| "classarm__compute_1_1_i_scheduler.xhtml#a34956db09db14c551e9966c9b66036f9", |
| "classarm__compute_1_1_n_e_canny_edge.xhtml", |
| "classarm__compute_1_1_n_e_fill_inner_border_kernel.xhtml#a2a4252d6ad42d3828955547d4dce0c21", |
| "classarm__compute_1_1_n_e_l_k_tracker_kernel.xhtml#a112b35dd205c62ea6ed1447ef226da82", |
| "classarm__compute_1_1_n_e_reshape_layer_kernel.xhtml#a83a344e60eb7db895953a942abf16628", |
| "classarm__compute_1_1_steps.xhtml#a48c1f75c6cf7bdb28eeec6a795c5cf0d", |
| "classarm__compute_1_1graph__utils_1_1_dummy_accessor.xhtml#ac5ae9597ba20e5581726743fe7c154b5", |
| "classarm__compute_1_1test_1_1_tensor_cache.xhtml", |
| "classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132", |
| "classarm__compute_1_1test_1_1framework_1_1dataset_1_1_range_dataset.xhtml#abbe90a5f39f36d8160747d349be64f36", |
| "data_import.xhtml#caffe_how_to", |
| "fixed__point_8h.xhtml#aa3594535118e4158134b8de127757e70", |
| "globals_w.xhtml", |
| "namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml", |
| "softmax__layer_8cl.xhtml#a538b4b63f40e7b12891774e03a4f0dec", |
| "structarm__compute_1_1test_1_1framework_1_1_test_info.xhtml#a9b45b3e13bd9167aab02e17e08916231", |
| "tests_2framework_2_utils_8h.xhtml#a898a0423aace06af0f3a18a26a972a1a", |
| "validation_2_c_p_p_2_convolution_layer_8cpp.xhtml#ac0a0d3a8a94f2f011d2969ff6b6c591f" |
| ]; |
| |
| var SYNCONMSG = 'click to disable panel synchronisation'; |
| var SYNCOFFMSG = 'click to enable panel synchronisation'; |
| var SYNCONMSG = 'click to disable panel synchronisation'; |
| var SYNCOFFMSG = 'click to enable panel synchronisation'; |
| var navTreeSubIndices = new Array(); |
| |
| function getData(varName) |
| { |
| var i = varName.lastIndexOf('/'); |
| var n = i>=0 ? varName.substring(i+1) : varName; |
| return eval(n.replace(/\-/g,'_')); |
| } |
| |
| function stripPath(uri) |
| { |
| return uri.substring(uri.lastIndexOf('/')+1); |
| } |
| |
| function stripPath2(uri) |
| { |
| var i = uri.lastIndexOf('/'); |
| var s = uri.substring(i+1); |
| var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); |
| return m ? uri.substring(i-6) : s; |
| } |
| |
| function localStorageSupported() |
| { |
| try { |
| return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; |
| } |
| catch(e) { |
| return false; |
| } |
| } |
| |
| |
| function storeLink(link) |
| { |
| if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { |
| window.localStorage.setItem('navpath',link); |
| } |
| } |
| |
| function deleteLink() |
| { |
| if (localStorageSupported()) { |
| window.localStorage.setItem('navpath',''); |
| } |
| } |
| |
| function cachedLink() |
| { |
| if (localStorageSupported()) { |
| return window.localStorage.getItem('navpath'); |
| } else { |
| return ''; |
| } |
| } |
| |
| function getScript(scriptName,func,show) |
| { |
| var head = document.getElementsByTagName("head")[0]; |
| var script = document.createElement('script'); |
| script.id = scriptName; |
| script.type = 'text/javascript'; |
| script.onload = func; |
| script.src = scriptName+'.js'; |
| if ($.browser.msie && $.browser.version<=8) { |
| // script.onload does not work with older versions of IE |
| script.onreadystatechange = function() { |
| if (script.readyState=='complete' || script.readyState=='loaded') { |
| func(); if (show) showRoot(); |
| } |
| } |
| } |
| head.appendChild(script); |
| } |
| |
| function createIndent(o,domNode,node,level) |
| { |
| var level=-1; |
| var n = node; |
| while (n.parentNode) { level++; n=n.parentNode; } |
| if (node.childrenData) { |
| var imgNode = document.createElement("img"); |
| imgNode.style.paddingLeft=(16*level).toString()+'px'; |
| imgNode.width = 16; |
| imgNode.height = 22; |
| imgNode.border = 0; |
| node.plus_img = imgNode; |
| node.expandToggle = document.createElement("a"); |
| node.expandToggle.href = "javascript:void(0)"; |
| node.expandToggle.onclick = function() { |
| if (node.expanded) { |
| $(node.getChildrenUL()).slideUp("fast"); |
| node.plus_img.src = node.relpath+"ftv2pnode.png"; |
| node.expanded = false; |
| } else { |
| expandNode(o, node, false, false); |
| } |
| } |
| node.expandToggle.appendChild(imgNode); |
| domNode.appendChild(node.expandToggle); |
| imgNode.src = node.relpath+"ftv2pnode.png"; |
| } else { |
| var span = document.createElement("span"); |
| span.style.display = 'inline-block'; |
| span.style.width = 16*(level+1)+'px'; |
| span.style.height = '22px'; |
| span.innerHTML = ' '; |
| domNode.appendChild(span); |
| } |
| } |
| |
| var animationInProgress = false; |
| |
| function gotoAnchor(anchor,aname,updateLocation) |
| { |
| var pos, docContent = $('#doc-content'); |
| if (anchor.parent().attr('class')=='memItemLeft' || |
| anchor.parent().attr('class')=='fieldtype' || |
| anchor.parent().is(':header')) |
| { |
| pos = anchor.parent().position().top; |
| } else if (anchor.position()) { |
| pos = anchor.position().top; |
| } |
| if (pos) { |
| var dist = Math.abs(Math.min( |
| pos-docContent.offset().top, |
| docContent[0].scrollHeight- |
| docContent.height()-docContent.scrollTop())); |
| animationInProgress=true; |
| docContent.animate({ |
| scrollTop: pos + docContent.scrollTop() - docContent.offset().top |
| },Math.max(50,Math.min(500,dist)),function(){ |
| if (updateLocation) window.location.href=aname; |
| animationInProgress=false; |
| }); |
| } |
| } |
| |
| function newNode(o, po, text, link, childrenData, lastNode) |
| { |
| var node = new Object(); |
| node.children = Array(); |
| node.childrenData = childrenData; |
| node.depth = po.depth + 1; |
| node.relpath = po.relpath; |
| node.isLast = lastNode; |
| |
| node.li = document.createElement("li"); |
| po.getChildrenUL().appendChild(node.li); |
| node.parentNode = po; |
| |
| node.itemDiv = document.createElement("div"); |
| node.itemDiv.className = "item"; |
| |
| node.labelSpan = document.createElement("span"); |
| node.labelSpan.className = "label"; |
| |
| createIndent(o,node.itemDiv,node,0); |
| node.itemDiv.appendChild(node.labelSpan); |
| node.li.appendChild(node.itemDiv); |
| |
| var a = document.createElement("a"); |
| node.labelSpan.appendChild(a); |
| node.label = document.createTextNode(text); |
| node.expanded = false; |
| a.appendChild(node.label); |
| if (link) { |
| var url; |
| if (link.substring(0,1)=='^') { |
| url = link.substring(1); |
| link = url; |
| } else { |
| url = node.relpath+link; |
| } |
| a.className = stripPath(link.replace('#',':')); |
| if (link.indexOf('#')!=-1) { |
| var aname = '#'+link.split('#')[1]; |
| var srcPage = stripPath($(location).attr('pathname')); |
| var targetPage = stripPath(link.split('#')[0]); |
| a.href = srcPage!=targetPage ? url : "javascript:void(0)"; |
| a.onclick = function(){ |
| storeLink(link); |
| if (!$(a).parent().parent().hasClass('selected')) |
| { |
| $('.item').removeClass('selected'); |
| $('.item').removeAttr('id'); |
| $(a).parent().parent().addClass('selected'); |
| $(a).parent().parent().attr('id','selected'); |
| } |
| var anchor = $(aname); |
| gotoAnchor(anchor,aname,true); |
| }; |
| } else { |
| a.href = url; |
| a.onclick = function() { storeLink(link); } |
| } |
| } else { |
| if (childrenData != null) |
| { |
| a.className = "nolink"; |
| a.href = "javascript:void(0)"; |
| a.onclick = node.expandToggle.onclick; |
| } |
| } |
| |
| node.childrenUL = null; |
| node.getChildrenUL = function() { |
| if (!node.childrenUL) { |
| node.childrenUL = document.createElement("ul"); |
| node.childrenUL.className = "children_ul"; |
| node.childrenUL.style.display = "none"; |
| node.li.appendChild(node.childrenUL); |
| } |
| return node.childrenUL; |
| }; |
| |
| return node; |
| } |
| |
| function showRoot() |
| { |
| var headerHeight = $("#top").height(); |
| var footerHeight = $("#nav-path").height(); |
| var windowHeight = $(window).height() - headerHeight - footerHeight; |
| (function (){ // retry until we can scroll to the selected item |
| try { |
| var navtree=$('#nav-tree'); |
| navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); |
| } catch (err) { |
| setTimeout(arguments.callee, 0); |
| } |
| })(); |
| } |
| |
| function expandNode(o, node, imm, showRoot) |
| { |
| if (node.childrenData && !node.expanded) { |
| if (typeof(node.childrenData)==='string') { |
| var varName = node.childrenData; |
| getScript(node.relpath+varName,function(){ |
| node.childrenData = getData(varName); |
| expandNode(o, node, imm, showRoot); |
| }, showRoot); |
| } else { |
| if (!node.childrenVisited) { |
| getNode(o, node); |
| } if (imm || ($.browser.msie && $.browser.version>8)) { |
| // somehow slideDown jumps to the start of tree for IE9 :-( |
| $(node.getChildrenUL()).show(); |
| } else { |
| $(node.getChildrenUL()).slideDown("fast"); |
| } |
| if (node.isLast) { |
| node.plus_img.src = node.relpath+"ftv2mlastnode.png"; |
| } else { |
| node.plus_img.src = node.relpath+"ftv2mnode.png"; |
| } |
| node.expanded = true; |
| } |
| } |
| } |
| |
| function glowEffect(n,duration) |
| { |
| n.addClass('glow').delay(duration).queue(function(next){ |
| $(this).removeClass('glow');next(); |
| }); |
| } |
| |
| function highlightAnchor() |
| { |
| var aname = $(location).attr('hash'); |
| var anchor = $(aname); |
| if (anchor.parent().attr('class')=='memItemLeft'){ |
| var rows = $('.memberdecls tr[class$="'+ |
| window.location.hash.substring(1)+'"]'); |
| glowEffect(rows.children(),300); // member without details |
| } else if (anchor.parents().slice(2).prop('tagName')=='TR') { |
| glowEffect(anchor.parents('div.memitem'),1000); // enum value |
| } else if (anchor.parent().attr('class')=='fieldtype'){ |
| glowEffect(anchor.parent().parent(),1000); // struct field |
| } else if (anchor.parent().is(":header")) { |
| glowEffect(anchor.parent(),1000); // section header |
| } else { |
| glowEffect(anchor.next(),1000); // normal member |
| } |
| gotoAnchor(anchor,aname,false); |
| } |
| |
| function selectAndHighlight(hash,n) |
| { |
| var a; |
| if (hash) { |
| var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1); |
| a=$('.item a[class$="'+link+'"]'); |
| } |
| if (a && a.length) { |
| a.parent().parent().addClass('selected'); |
| a.parent().parent().attr('id','selected'); |
| highlightAnchor(); |
| } else if (n) { |
| $(n.itemDiv).addClass('selected'); |
| $(n.itemDiv).attr('id','selected'); |
| } |
| if ($('#nav-tree-contents .item:first').hasClass('selected')) { |
| $('#nav-sync').css('top','30px'); |
| } else { |
| $('#nav-sync').css('top','5px'); |
| } |
| showRoot(); |
| } |
| |
| function showNode(o, node, index, hash) |
| { |
| if (node && node.childrenData) { |
| if (typeof(node.childrenData)==='string') { |
| var varName = node.childrenData; |
| getScript(node.relpath+varName,function(){ |
| node.childrenData = getData(varName); |
| showNode(o,node,index,hash); |
| },true); |
| } else { |
| if (!node.childrenVisited) { |
| getNode(o, node); |
| } |
| $(node.getChildrenUL()).css({'display':'block'}); |
| if (node.isLast) { |
| node.plus_img.src = node.relpath+"ftv2mlastnode.png"; |
| } else { |
| node.plus_img.src = node.relpath+"ftv2mnode.png"; |
| } |
| node.expanded = true; |
| var n = node.children[o.breadcrumbs[index]]; |
| if (index+1<o.breadcrumbs.length) { |
| showNode(o,n,index+1,hash); |
| } else { |
| if (typeof(n.childrenData)==='string') { |
| var varName = n.childrenData; |
| getScript(n.relpath+varName,function(){ |
| n.childrenData = getData(varName); |
| node.expanded=false; |
| showNode(o,node,index,hash); // retry with child node expanded |
| },true); |
| } else { |
| var rootBase = stripPath(o.toroot.replace(/\..+$/, '')); |
| if (rootBase=="index" || rootBase=="pages" || rootBase=="search") { |
| expandNode(o, n, true, true); |
| } |
| selectAndHighlight(hash,n); |
| } |
| } |
| } |
| } else { |
| selectAndHighlight(hash); |
| } |
| } |
| |
| function removeToInsertLater(element) { |
| var parentNode = element.parentNode; |
| var nextSibling = element.nextSibling; |
| parentNode.removeChild(element); |
| return function() { |
| if (nextSibling) { |
| parentNode.insertBefore(element, nextSibling); |
| } else { |
| parentNode.appendChild(element); |
| } |
| }; |
| } |
| |
| function getNode(o, po) |
| { |
| var insertFunction = removeToInsertLater(po.li); |
| po.childrenVisited = true; |
| var l = po.childrenData.length-1; |
| for (var i in po.childrenData) { |
| var nodeData = po.childrenData[i]; |
| po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], |
| i==l); |
| } |
| insertFunction(); |
| } |
| |
| function gotoNode(o,subIndex,root,hash,relpath) |
| { |
| var nti = navTreeSubIndices[subIndex][root+hash]; |
| o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]); |
| if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index |
| navTo(o,NAVTREE[0][1],"",relpath); |
| $('.item').removeClass('selected'); |
| $('.item').removeAttr('id'); |
| } |
| if (o.breadcrumbs) { |
| o.breadcrumbs.unshift(0); // add 0 for root node |
| showNode(o, o.node, 0, hash); |
| } |
| } |
| |
| function navTo(o,root,hash,relpath) |
| { |
| var link = cachedLink(); |
| if (link) { |
| var parts = link.split('#'); |
| root = parts[0]; |
| if (parts.length>1) hash = '#'+parts[1]; |
| else hash=''; |
| } |
| if (hash.match(/^#l\d+$/)) { |
| var anchor=$('a[name='+hash.substring(1)+']'); |
| glowEffect(anchor.parent(),1000); // line number |
| hash=''; // strip line number anchors |
| //root=root.replace(/_source\./,'.'); // source link to doc link |
| } |
| var url=root+hash; |
| var i=-1; |
| while (NAVTREEINDEX[i+1]<=url) i++; |
| if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index |
| if (navTreeSubIndices[i]) { |
| gotoNode(o,i,root,hash,relpath) |
| } else { |
| getScript(relpath+'navtreeindex'+i,function(){ |
| navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); |
| if (navTreeSubIndices[i]) { |
| gotoNode(o,i,root,hash,relpath); |
| } |
| },true); |
| } |
| } |
| |
| function showSyncOff(n,relpath) |
| { |
| n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>'); |
| } |
| |
| function showSyncOn(n,relpath) |
| { |
| n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>'); |
| } |
| |
| function toggleSyncButton(relpath) |
| { |
| var navSync = $('#nav-sync'); |
| if (navSync.hasClass('sync')) { |
| navSync.removeClass('sync'); |
| showSyncOff(navSync,relpath); |
| storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash')); |
| } else { |
| navSync.addClass('sync'); |
| showSyncOn(navSync,relpath); |
| deleteLink(); |
| } |
| } |
| |
| function initNavTree(toroot,relpath) |
| { |
| var o = new Object(); |
| o.toroot = toroot; |
| o.node = new Object(); |
| o.node.li = document.getElementById("nav-tree-contents"); |
| o.node.childrenData = NAVTREE; |
| o.node.children = new Array(); |
| o.node.childrenUL = document.createElement("ul"); |
| o.node.getChildrenUL = function() { return o.node.childrenUL; }; |
| o.node.li.appendChild(o.node.childrenUL); |
| o.node.depth = 0; |
| o.node.relpath = relpath; |
| o.node.expanded = false; |
| o.node.isLast = true; |
| o.node.plus_img = document.createElement("img"); |
| o.node.plus_img.src = relpath+"ftv2pnode.png"; |
| o.node.plus_img.width = 16; |
| o.node.plus_img.height = 22; |
| |
| if (localStorageSupported()) { |
| var navSync = $('#nav-sync'); |
| if (cachedLink()) { |
| showSyncOff(navSync,relpath); |
| navSync.removeClass('sync'); |
| } else { |
| showSyncOn(navSync,relpath); |
| } |
| navSync.click(function(){ toggleSyncButton(relpath); }); |
| } |
| |
| $(window).load(function(){ |
| navTo(o,toroot,window.location.hash,relpath); |
| showRoot(); |
| }); |
| |
| $(window).bind('hashchange', function(){ |
| if (window.location.hash && window.location.hash.length>1){ |
| var a; |
| if ($(location).attr('hash')){ |
| var clslink=stripPath($(location).attr('pathname'))+':'+ |
| $(location).attr('hash').substring(1); |
| a=$('.item a[class$="'+clslink+'"]'); |
| } |
| if (a==null || !$(a).parent().parent().hasClass('selected')){ |
| $('.item').removeClass('selected'); |
| $('.item').removeAttr('id'); |
| } |
| var link=stripPath2($(location).attr('pathname')); |
| navTo(o,link,$(location).attr('hash'),relpath); |
| } else if (!animationInProgress) { |
| $('#doc-content').scrollTop(0); |
| $('.item').removeClass('selected'); |
| $('.item').removeAttr('id'); |
| navTo(o,toroot,window.location.hash,relpath); |
| } |
| }) |
| } |
| |