Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 1 | var 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 | ] ], |
| 21 | [ "Building on a Windows host system", "index.xhtml#S3_4_windows_host", [ |
| 22 | [ "Bash on Ubuntu on Windows", "index.xhtml#S3_4_1_ubuntu_on_windows", null ], |
| 23 | [ "Cygwin", "index.xhtml#S3_4_2_cygwin", null ] |
| 24 | ] ], |
| 25 | [ "The OpenCL stub library", "index.xhtml#S3_5_cl_stub_library", null ] |
| 26 | ] ] |
| 27 | ] ], |
| 28 | [ "Library architecture", "architecture.xhtml", [ |
| 29 | [ "Core vs Runtime libraries", "architecture.xhtml#S4_1", null ], |
| 30 | [ "Windows, kernels, multi-threading and functions", "architecture.xhtml#S4_2_windows_kernels_mt_functions", [ |
| 31 | [ "Windows", "architecture.xhtml#S4_2_1_windows", null ], |
| 32 | [ "Kernels", "architecture.xhtml#S4_2_2", null ], |
| 33 | [ "Multi-threading", "architecture.xhtml#S4_2_3", null ], |
| 34 | [ "Functions", "architecture.xhtml#S4_2_4", null ], |
| 35 | [ "OpenCL Scheduler and kernel library", "architecture.xhtml#S4_4_1_cl_scheduler", null ], |
| 36 | [ "OpenCL events and synchronization", "architecture.xhtml#S4_4_2_events_sync", null ], |
| 37 | [ "OpenCL / NEON interoperability", "architecture.xhtml#S4_4_2_cl_neon", null ] |
| 38 | ] ], |
| 39 | [ "Algorithms", "architecture.xhtml#S4_5_algorithms", null ], |
| 40 | [ "Images, padding, border modes and tensors", "architecture.xhtml#S4_6_images_tensors", [ |
| 41 | [ "Padding and border modes", "architecture.xhtml#S4_6_1_padding_and_border", [ |
| 42 | [ "Padding", "architecture.xhtml#padding", null ], |
| 43 | [ "Valid regions", "architecture.xhtml#valid_region", null ] |
| 44 | ] ], |
| 45 | [ "Tensors", "architecture.xhtml#S4_6_2_tensors", null ], |
| 46 | [ "Images and Tensors description conventions", "architecture.xhtml#S4_6_3_description_conventions", null ], |
| 47 | [ "Working with Images and Tensors using iterators", "architecture.xhtml#S4_6_4_working_with_objects", null ] |
| 48 | ] ], |
| 49 | [ "MemoryManager", "architecture.xhtml#S4_7_memory_manager", [ |
| 50 | [ "MemoryGroup, MemoryPool and MemoryManager Components", "architecture.xhtml#S4_7_1_memory_manager_components", [ |
| 51 | [ "MemoryGroup", "architecture.xhtml#S4_7_1_1_memory_group", null ], |
| 52 | [ "MemoryPool", "architecture.xhtml#S4_7_1_2_memory_pool", null ], |
| 53 | [ "MemoryManager Components", "architecture.xhtml#S4_7_1_2_memory_manager_components", null ] |
| 54 | ] ], |
| 55 | [ "Working with the Memory Manager", "architecture.xhtml#S4_7_2_working_with_memory_manager", null ], |
| 56 | [ "Function support", "architecture.xhtml#S4_7_3_memory_manager_function_support", null ] |
| 57 | ] ] |
| 58 | ] ], |
| 59 | [ "Validation and benchmarks tests", "tests.xhtml", [ |
| 60 | [ "Overview", "tests.xhtml#tests_overview", [ |
| 61 | [ "Fixtures", "tests.xhtml#tests_overview_fixtures", [ |
| 62 | [ "Fixture", "tests.xhtml#tests_overview_fixtures_fixture", null ], |
| 63 | [ "Data fixture", "tests.xhtml#tests_overview_fixtures_data_fixture", null ] |
| 64 | ] ], |
| 65 | [ "Test cases", "tests.xhtml#tests_overview_test_cases", [ |
| 66 | [ "Test case", "tests.xhtml#tests_overview_test_cases_test_case", null ], |
| 67 | [ "Fixture test case", "tests.xhtml#tests_overview_test_cases_fixture_fixture_test_case", null ], |
| 68 | [ "Registering a fixture as test case", "tests.xhtml#tests_overview_test_cases_fixture_register_fixture_test_case", null ], |
| 69 | [ "Data test case", "tests.xhtml#tests_overview_test_cases_data_test_case", null ], |
| 70 | [ "Fixture data test case", "tests.xhtml#tests_overview_test_cases_fixture_data_test_case", null ], |
| 71 | [ "Registering a fixture as data test case", "tests.xhtml#tests_overview_test_cases_register_fixture_data_test_case", null ] |
| 72 | ] ] |
| 73 | ] ], |
| 74 | [ "Writing validation tests", "tests.xhtml#writing_tests", null ], |
| 75 | [ "Running tests", "tests.xhtml#tests_running_tests", [ |
| 76 | [ "Benchmarking", "tests.xhtml#tests_running_tests_benchmarking", [ |
| 77 | [ "Filter tests", "tests.xhtml#tests_running_tests_benchmarking_filter", null ], |
| 78 | [ "Runtime", "tests.xhtml#tests_running_tests_benchmarking_runtime", null ], |
| 79 | [ "Output", "tests.xhtml#tests_running_tests_benchmarking_output", null ] |
| 80 | ] ], |
| 81 | [ "Validation", "tests.xhtml#tests_running_tests_validation", null ] |
| 82 | ] ] |
| 83 | ] ], |
| 84 | [ "Importing data from existing models", "data_import.xhtml", [ |
| 85 | [ "Extract data from pre-trained caffe model", "data_import.xhtml#caffe_data_extractor", [ |
| 86 | [ "How to use the script", "data_import.xhtml#caffe_how_to", null ], |
| 87 | [ "What is the expected output from the script", "data_import.xhtml#caffe_result", null ] |
| 88 | ] ], |
| 89 | [ "Extract data from pre-trained tensorflow model", "data_import.xhtml#tensorflow_data_extractor", [ |
| 90 | [ "How to use the script", "data_import.xhtml#tensorflow_how_to", null ], |
| 91 | [ "What is the expected output from the script", "data_import.xhtml#tensorflow_result", null ] |
| 92 | ] ] |
| 93 | ] ], |
| 94 | [ "Namespaces", null, [ |
| 95 | [ "Namespace List", "namespaces.xhtml", "namespaces" ], |
| 96 | [ "Namespace Members", "namespacemembers.xhtml", [ |
| 97 | [ "All", "namespacemembers.xhtml", "namespacemembers_dup" ], |
| 98 | [ "Functions", "namespacemembers_func.xhtml", "namespacemembers_func" ], |
| 99 | [ "Variables", "namespacemembers_vars.xhtml", null ], |
| 100 | [ "Typedefs", "namespacemembers_type.xhtml", "namespacemembers_type" ], |
| 101 | [ "Enumerations", "namespacemembers_enum.xhtml", null ], |
| 102 | [ "Enumerator", "namespacemembers_eval.xhtml", null ] |
| 103 | ] ] |
| 104 | ] ], |
| 105 | [ "Data Structures", null, [ |
| 106 | [ "Data Structures", "annotated.xhtml", "annotated" ], |
| 107 | [ "Data Structure Index", "classes.xhtml", null ], |
| 108 | [ "Class Hierarchy", "hierarchy.xhtml", "hierarchy" ], |
| 109 | [ "Data Fields", "functions.xhtml", [ |
| 110 | [ "All", "functions.xhtml", "functions_dup" ], |
| 111 | [ "Functions", "functions_func.xhtml", "functions_func" ], |
| 112 | [ "Variables", "functions_vars.xhtml", "functions_vars" ], |
| 113 | [ "Typedefs", "functions_type.xhtml", null ], |
| 114 | [ "Enumerations", "functions_enum.xhtml", null ], |
| 115 | [ "Enumerator", "functions_eval.xhtml", null ], |
| 116 | [ "Related Functions", "functions_rela.xhtml", null ] |
| 117 | ] ] |
| 118 | ] ], |
| 119 | [ "Files", null, [ |
| 120 | [ "File List", "files.xhtml", "files" ], |
| 121 | [ "Globals", "globals.xhtml", [ |
| 122 | [ "All", "globals.xhtml", "globals_dup" ], |
| 123 | [ "Functions", "globals_func.xhtml", "globals_func" ], |
| 124 | [ "Variables", "globals_vars.xhtml", null ], |
| 125 | [ "Typedefs", "globals_type.xhtml", null ], |
| 126 | [ "Macros", "globals_defs.xhtml", "globals_defs" ] |
| 127 | ] ] |
| 128 | ] ] |
| 129 | ] ] |
| 130 | ]; |
| 131 | |
| 132 | var NAVTREEINDEX = |
| 133 | [ |
| 134 | "_access_window_auto_padding_8h.xhtml", |
| 135 | "_c_l_2_l2_normalize_8cpp.xhtml#a73e3a821b37933eebdf70b9e61d5a156", |
| 136 | "_c_l_fast_corners_8h_source.xhtml", |
| 137 | "_c_l_types_8h.xhtml#a735ac6c2a02e320969625308810444f3a0a91b0ff027767625b7d1a924e10c298", |
| 138 | "_direct_convolution_layer_dataset_8h_source.xhtml", |
| 139 | "_i_c_l_kernel_8h.xhtml", |
| 140 | "_n_e_activation_layer_8h.xhtml", |
| 141 | "_n_e_fixed_point_8h.xhtml#ac2edef8bf07bce91b37aa02b952b8ed6", |
| 142 | "_n_e_l2_normalize_8h_source.xhtml", |
| 143 | "_n_e_o_n_2_min_max_location_8cpp.xhtml#af8115bb60734e2ad3cc20b8f73b74cd8", |
| 144 | "_range_dataset_8h.xhtml#a79a0f3a3229c216adf314eb6030d6e24", |
| 145 | "_window_8inl.xhtml", |
| 146 | "arm__compute_2core_2_types_8h.xhtml#ab4e88c89b3b7ea1735996cc4def22d58af557448a61ad2927194f63442e131dfa", |
| 147 | "benchmark_2_n_e_o_n_2_convolution_layer_8cpp.xhtml#a7da7dbada8d8e076c78d1402743b7de9", |
| 148 | "classarm__compute_1_1_c_l_absolute_difference.xhtml#af53d66a8f8dd368d3c06b43c0c6a12f1", |
| 149 | "classarm__compute_1_1_c_l_depthwise_im2_col_kernel.xhtml#a0a10e55699b26afdf2fbf336dc9cad09", |
| 150 | "classarm__compute_1_1_c_l_gaussian_pyramid_orb.xhtml#a3039d9b3acf6992402f841a9290338f9", |
| 151 | "classarm__compute_1_1_c_l_magnitude_phase_kernel.xhtml#a26b6db53a3b87bcf6476d95d45dff938", |
| 152 | "classarm__compute_1_1_c_l_sobel5x5_hor_kernel.xhtml#ab24f49526202babfe7df925cd326427b", |
| 153 | "classarm__compute_1_1_h_o_g_info.xhtml#a8f6435e0a7c016e3cb0fc94b33067e50", |
| 154 | "classarm__compute_1_1_i_scheduler.xhtml#a34956db09db14c551e9966c9b66036f9", |
| 155 | "classarm__compute_1_1_n_e_canny_edge.xhtml", |
| 156 | "classarm__compute_1_1_n_e_fill_inner_border_kernel.xhtml#a2a4252d6ad42d3828955547d4dce0c21", |
| 157 | "classarm__compute_1_1_n_e_l_k_tracker_kernel.xhtml#a112b35dd205c62ea6ed1447ef226da82", |
| 158 | "classarm__compute_1_1_n_e_reshape_layer_kernel.xhtml#a83a344e60eb7db895953a942abf16628", |
| 159 | "classarm__compute_1_1_steps.xhtml#a48c1f75c6cf7bdb28eeec6a795c5cf0d", |
| 160 | "classarm__compute_1_1graph__utils_1_1_dummy_accessor.xhtml#ac5ae9597ba20e5581726743fe7c154b5", |
| 161 | "classarm__compute_1_1test_1_1_tensor_cache.xhtml", |
| 162 | "classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132", |
| 163 | "classarm__compute_1_1test_1_1framework_1_1dataset_1_1_range_dataset.xhtml#abbe90a5f39f36d8160747d349be64f36", |
| 164 | "data_import.xhtml#caffe_how_to", |
| 165 | "fixed__point_8h.xhtml#aa3594535118e4158134b8de127757e70", |
| 166 | "globals_w.xhtml", |
| 167 | "namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml", |
| 168 | "softmax__layer_8cl.xhtml#a538b4b63f40e7b12891774e03a4f0dec", |
| 169 | "structarm__compute_1_1test_1_1framework_1_1_test_info.xhtml#a9b45b3e13bd9167aab02e17e08916231", |
| 170 | "tests_2framework_2_utils_8h.xhtml#a898a0423aace06af0f3a18a26a972a1a", |
| 171 | "validation_2_c_p_p_2_convolution_layer_8cpp.xhtml#ac0a0d3a8a94f2f011d2969ff6b6c591f" |
| 172 | ]; |
| 173 | |
| 174 | var SYNCONMSG = 'click to disable panel synchronisation'; |
| 175 | var SYNCOFFMSG = 'click to enable panel synchronisation'; |
| 176 | var SYNCONMSG = 'click to disable panel synchronisation'; |
| 177 | var SYNCOFFMSG = 'click to enable panel synchronisation'; |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 178 | var navTreeSubIndices = new Array(); |
| 179 | |
| 180 | function getData(varName) |
| 181 | { |
| 182 | var i = varName.lastIndexOf('/'); |
| 183 | var n = i>=0 ? varName.substring(i+1) : varName; |
| 184 | return eval(n.replace(/\-/g,'_')); |
| 185 | } |
| 186 | |
| 187 | function stripPath(uri) |
| 188 | { |
| 189 | return uri.substring(uri.lastIndexOf('/')+1); |
| 190 | } |
| 191 | |
| 192 | function stripPath2(uri) |
| 193 | { |
| 194 | var i = uri.lastIndexOf('/'); |
| 195 | var s = uri.substring(i+1); |
| 196 | var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); |
| 197 | return m ? uri.substring(i-6) : s; |
| 198 | } |
| 199 | |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 200 | function localStorageSupported() |
| 201 | { |
| 202 | try { |
| 203 | return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; |
| 204 | } |
| 205 | catch(e) { |
| 206 | return false; |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | |
| 211 | function storeLink(link) |
| 212 | { |
| 213 | if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { |
| 214 | window.localStorage.setItem('navpath',link); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | function deleteLink() |
| 219 | { |
| 220 | if (localStorageSupported()) { |
| 221 | window.localStorage.setItem('navpath',''); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 222 | } |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | function cachedLink() |
| 226 | { |
| 227 | if (localStorageSupported()) { |
| 228 | return window.localStorage.getItem('navpath'); |
| 229 | } else { |
| 230 | return ''; |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | function getScript(scriptName,func,show) |
| 235 | { |
| 236 | var head = document.getElementsByTagName("head")[0]; |
| 237 | var script = document.createElement('script'); |
| 238 | script.id = scriptName; |
| 239 | script.type = 'text/javascript'; |
| 240 | script.onload = func; |
| 241 | script.src = scriptName+'.js'; |
| 242 | if ($.browser.msie && $.browser.version<=8) { |
| 243 | // script.onload does not work with older versions of IE |
| 244 | script.onreadystatechange = function() { |
| 245 | if (script.readyState=='complete' || script.readyState=='loaded') { |
| 246 | func(); if (show) showRoot(); |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | head.appendChild(script); |
| 251 | } |
| 252 | |
| 253 | function createIndent(o,domNode,node,level) |
| 254 | { |
| 255 | var level=-1; |
| 256 | var n = node; |
| 257 | while (n.parentNode) { level++; n=n.parentNode; } |
| 258 | if (node.childrenData) { |
| 259 | var imgNode = document.createElement("img"); |
| 260 | imgNode.style.paddingLeft=(16*level).toString()+'px'; |
| 261 | imgNode.width = 16; |
| 262 | imgNode.height = 22; |
| 263 | imgNode.border = 0; |
| 264 | node.plus_img = imgNode; |
| 265 | node.expandToggle = document.createElement("a"); |
| 266 | node.expandToggle.href = "javascript:void(0)"; |
| 267 | node.expandToggle.onclick = function() { |
| 268 | if (node.expanded) { |
| 269 | $(node.getChildrenUL()).slideUp("fast"); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 270 | node.plus_img.src = node.relpath+"ftv2pnode.png"; |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 271 | node.expanded = false; |
| 272 | } else { |
| 273 | expandNode(o, node, false, false); |
| 274 | } |
| 275 | } |
| 276 | node.expandToggle.appendChild(imgNode); |
| 277 | domNode.appendChild(node.expandToggle); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 278 | imgNode.src = node.relpath+"ftv2pnode.png"; |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 279 | } else { |
| 280 | var span = document.createElement("span"); |
| 281 | span.style.display = 'inline-block'; |
| 282 | span.style.width = 16*(level+1)+'px'; |
| 283 | span.style.height = '22px'; |
| 284 | span.innerHTML = ' '; |
| 285 | domNode.appendChild(span); |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | var animationInProgress = false; |
| 290 | |
| 291 | function gotoAnchor(anchor,aname,updateLocation) |
| 292 | { |
| 293 | var pos, docContent = $('#doc-content'); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 294 | if (anchor.parent().attr('class')=='memItemLeft' || |
| 295 | anchor.parent().attr('class')=='fieldtype' || |
| 296 | anchor.parent().is(':header')) |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 297 | { |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 298 | pos = anchor.parent().position().top; |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 299 | } else if (anchor.position()) { |
| 300 | pos = anchor.position().top; |
| 301 | } |
| 302 | if (pos) { |
| 303 | var dist = Math.abs(Math.min( |
| 304 | pos-docContent.offset().top, |
| 305 | docContent[0].scrollHeight- |
| 306 | docContent.height()-docContent.scrollTop())); |
| 307 | animationInProgress=true; |
| 308 | docContent.animate({ |
| 309 | scrollTop: pos + docContent.scrollTop() - docContent.offset().top |
| 310 | },Math.max(50,Math.min(500,dist)),function(){ |
| 311 | if (updateLocation) window.location.href=aname; |
| 312 | animationInProgress=false; |
| 313 | }); |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | function newNode(o, po, text, link, childrenData, lastNode) |
| 318 | { |
| 319 | var node = new Object(); |
| 320 | node.children = Array(); |
| 321 | node.childrenData = childrenData; |
| 322 | node.depth = po.depth + 1; |
| 323 | node.relpath = po.relpath; |
| 324 | node.isLast = lastNode; |
| 325 | |
| 326 | node.li = document.createElement("li"); |
| 327 | po.getChildrenUL().appendChild(node.li); |
| 328 | node.parentNode = po; |
| 329 | |
| 330 | node.itemDiv = document.createElement("div"); |
| 331 | node.itemDiv.className = "item"; |
| 332 | |
| 333 | node.labelSpan = document.createElement("span"); |
| 334 | node.labelSpan.className = "label"; |
| 335 | |
| 336 | createIndent(o,node.itemDiv,node,0); |
| 337 | node.itemDiv.appendChild(node.labelSpan); |
| 338 | node.li.appendChild(node.itemDiv); |
| 339 | |
| 340 | var a = document.createElement("a"); |
| 341 | node.labelSpan.appendChild(a); |
| 342 | node.label = document.createTextNode(text); |
| 343 | node.expanded = false; |
| 344 | a.appendChild(node.label); |
| 345 | if (link) { |
| 346 | var url; |
| 347 | if (link.substring(0,1)=='^') { |
| 348 | url = link.substring(1); |
| 349 | link = url; |
| 350 | } else { |
| 351 | url = node.relpath+link; |
| 352 | } |
| 353 | a.className = stripPath(link.replace('#',':')); |
| 354 | if (link.indexOf('#')!=-1) { |
| 355 | var aname = '#'+link.split('#')[1]; |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 356 | var srcPage = stripPath($(location).attr('pathname')); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 357 | var targetPage = stripPath(link.split('#')[0]); |
| 358 | a.href = srcPage!=targetPage ? url : "javascript:void(0)"; |
| 359 | a.onclick = function(){ |
| 360 | storeLink(link); |
| 361 | if (!$(a).parent().parent().hasClass('selected')) |
| 362 | { |
| 363 | $('.item').removeClass('selected'); |
| 364 | $('.item').removeAttr('id'); |
| 365 | $(a).parent().parent().addClass('selected'); |
| 366 | $(a).parent().parent().attr('id','selected'); |
| 367 | } |
| 368 | var anchor = $(aname); |
| 369 | gotoAnchor(anchor,aname,true); |
| 370 | }; |
| 371 | } else { |
| 372 | a.href = url; |
| 373 | a.onclick = function() { storeLink(link); } |
| 374 | } |
| 375 | } else { |
| 376 | if (childrenData != null) |
| 377 | { |
| 378 | a.className = "nolink"; |
| 379 | a.href = "javascript:void(0)"; |
| 380 | a.onclick = node.expandToggle.onclick; |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | node.childrenUL = null; |
| 385 | node.getChildrenUL = function() { |
| 386 | if (!node.childrenUL) { |
| 387 | node.childrenUL = document.createElement("ul"); |
| 388 | node.childrenUL.className = "children_ul"; |
| 389 | node.childrenUL.style.display = "none"; |
| 390 | node.li.appendChild(node.childrenUL); |
| 391 | } |
| 392 | return node.childrenUL; |
| 393 | }; |
| 394 | |
| 395 | return node; |
| 396 | } |
| 397 | |
| 398 | function showRoot() |
| 399 | { |
| 400 | var headerHeight = $("#top").height(); |
| 401 | var footerHeight = $("#nav-path").height(); |
| 402 | var windowHeight = $(window).height() - headerHeight - footerHeight; |
| 403 | (function (){ // retry until we can scroll to the selected item |
| 404 | try { |
| 405 | var navtree=$('#nav-tree'); |
| 406 | navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); |
| 407 | } catch (err) { |
| 408 | setTimeout(arguments.callee, 0); |
| 409 | } |
| 410 | })(); |
| 411 | } |
| 412 | |
| 413 | function expandNode(o, node, imm, showRoot) |
| 414 | { |
| 415 | if (node.childrenData && !node.expanded) { |
| 416 | if (typeof(node.childrenData)==='string') { |
| 417 | var varName = node.childrenData; |
| 418 | getScript(node.relpath+varName,function(){ |
| 419 | node.childrenData = getData(varName); |
| 420 | expandNode(o, node, imm, showRoot); |
| 421 | }, showRoot); |
| 422 | } else { |
| 423 | if (!node.childrenVisited) { |
| 424 | getNode(o, node); |
| 425 | } if (imm || ($.browser.msie && $.browser.version>8)) { |
| 426 | // somehow slideDown jumps to the start of tree for IE9 :-( |
| 427 | $(node.getChildrenUL()).show(); |
| 428 | } else { |
| 429 | $(node.getChildrenUL()).slideDown("fast"); |
| 430 | } |
| 431 | if (node.isLast) { |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 432 | node.plus_img.src = node.relpath+"ftv2mlastnode.png"; |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 433 | } else { |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 434 | node.plus_img.src = node.relpath+"ftv2mnode.png"; |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 435 | } |
| 436 | node.expanded = true; |
| 437 | } |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | function glowEffect(n,duration) |
| 442 | { |
| 443 | n.addClass('glow').delay(duration).queue(function(next){ |
| 444 | $(this).removeClass('glow');next(); |
| 445 | }); |
| 446 | } |
| 447 | |
| 448 | function highlightAnchor() |
| 449 | { |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 450 | var aname = $(location).attr('hash'); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 451 | var anchor = $(aname); |
| 452 | if (anchor.parent().attr('class')=='memItemLeft'){ |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 453 | var rows = $('.memberdecls tr[class$="'+ |
| 454 | window.location.hash.substring(1)+'"]'); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 455 | glowEffect(rows.children(),300); // member without details |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 456 | } else if (anchor.parents().slice(2).prop('tagName')=='TR') { |
| 457 | glowEffect(anchor.parents('div.memitem'),1000); // enum value |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 458 | } else if (anchor.parent().attr('class')=='fieldtype'){ |
| 459 | glowEffect(anchor.parent().parent(),1000); // struct field |
| 460 | } else if (anchor.parent().is(":header")) { |
| 461 | glowEffect(anchor.parent(),1000); // section header |
| 462 | } else { |
| 463 | glowEffect(anchor.next(),1000); // normal member |
| 464 | } |
| 465 | gotoAnchor(anchor,aname,false); |
| 466 | } |
| 467 | |
| 468 | function selectAndHighlight(hash,n) |
| 469 | { |
| 470 | var a; |
| 471 | if (hash) { |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 472 | var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 473 | a=$('.item a[class$="'+link+'"]'); |
| 474 | } |
| 475 | if (a && a.length) { |
| 476 | a.parent().parent().addClass('selected'); |
| 477 | a.parent().parent().attr('id','selected'); |
| 478 | highlightAnchor(); |
| 479 | } else if (n) { |
| 480 | $(n.itemDiv).addClass('selected'); |
| 481 | $(n.itemDiv).attr('id','selected'); |
| 482 | } |
| 483 | if ($('#nav-tree-contents .item:first').hasClass('selected')) { |
| 484 | $('#nav-sync').css('top','30px'); |
| 485 | } else { |
| 486 | $('#nav-sync').css('top','5px'); |
| 487 | } |
| 488 | showRoot(); |
| 489 | } |
| 490 | |
| 491 | function showNode(o, node, index, hash) |
| 492 | { |
| 493 | if (node && node.childrenData) { |
| 494 | if (typeof(node.childrenData)==='string') { |
| 495 | var varName = node.childrenData; |
| 496 | getScript(node.relpath+varName,function(){ |
| 497 | node.childrenData = getData(varName); |
| 498 | showNode(o,node,index,hash); |
| 499 | },true); |
| 500 | } else { |
| 501 | if (!node.childrenVisited) { |
| 502 | getNode(o, node); |
| 503 | } |
| 504 | $(node.getChildrenUL()).css({'display':'block'}); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 505 | if (node.isLast) { |
| 506 | node.plus_img.src = node.relpath+"ftv2mlastnode.png"; |
| 507 | } else { |
| 508 | node.plus_img.src = node.relpath+"ftv2mnode.png"; |
| 509 | } |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 510 | node.expanded = true; |
| 511 | var n = node.children[o.breadcrumbs[index]]; |
| 512 | if (index+1<o.breadcrumbs.length) { |
| 513 | showNode(o,n,index+1,hash); |
| 514 | } else { |
| 515 | if (typeof(n.childrenData)==='string') { |
| 516 | var varName = n.childrenData; |
| 517 | getScript(n.relpath+varName,function(){ |
| 518 | n.childrenData = getData(varName); |
| 519 | node.expanded=false; |
| 520 | showNode(o,node,index,hash); // retry with child node expanded |
| 521 | },true); |
| 522 | } else { |
| 523 | var rootBase = stripPath(o.toroot.replace(/\..+$/, '')); |
| 524 | if (rootBase=="index" || rootBase=="pages" || rootBase=="search") { |
| 525 | expandNode(o, n, true, true); |
| 526 | } |
| 527 | selectAndHighlight(hash,n); |
| 528 | } |
| 529 | } |
| 530 | } |
| 531 | } else { |
| 532 | selectAndHighlight(hash); |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | function removeToInsertLater(element) { |
| 537 | var parentNode = element.parentNode; |
| 538 | var nextSibling = element.nextSibling; |
| 539 | parentNode.removeChild(element); |
| 540 | return function() { |
| 541 | if (nextSibling) { |
| 542 | parentNode.insertBefore(element, nextSibling); |
| 543 | } else { |
| 544 | parentNode.appendChild(element); |
| 545 | } |
| 546 | }; |
| 547 | } |
| 548 | |
| 549 | function getNode(o, po) |
| 550 | { |
| 551 | var insertFunction = removeToInsertLater(po.li); |
| 552 | po.childrenVisited = true; |
| 553 | var l = po.childrenData.length-1; |
| 554 | for (var i in po.childrenData) { |
| 555 | var nodeData = po.childrenData[i]; |
| 556 | po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], |
| 557 | i==l); |
| 558 | } |
| 559 | insertFunction(); |
| 560 | } |
| 561 | |
| 562 | function gotoNode(o,subIndex,root,hash,relpath) |
| 563 | { |
| 564 | var nti = navTreeSubIndices[subIndex][root+hash]; |
| 565 | o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]); |
| 566 | if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index |
| 567 | navTo(o,NAVTREE[0][1],"",relpath); |
| 568 | $('.item').removeClass('selected'); |
| 569 | $('.item').removeAttr('id'); |
| 570 | } |
| 571 | if (o.breadcrumbs) { |
| 572 | o.breadcrumbs.unshift(0); // add 0 for root node |
| 573 | showNode(o, o.node, 0, hash); |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | function navTo(o,root,hash,relpath) |
| 578 | { |
| 579 | var link = cachedLink(); |
| 580 | if (link) { |
| 581 | var parts = link.split('#'); |
| 582 | root = parts[0]; |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 583 | if (parts.length>1) hash = '#'+parts[1]; |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 584 | else hash=''; |
| 585 | } |
| 586 | if (hash.match(/^#l\d+$/)) { |
| 587 | var anchor=$('a[name='+hash.substring(1)+']'); |
| 588 | glowEffect(anchor.parent(),1000); // line number |
| 589 | hash=''; // strip line number anchors |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 590 | //root=root.replace(/_source\./,'.'); // source link to doc link |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 591 | } |
| 592 | var url=root+hash; |
| 593 | var i=-1; |
| 594 | while (NAVTREEINDEX[i+1]<=url) i++; |
| 595 | if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index |
| 596 | if (navTreeSubIndices[i]) { |
| 597 | gotoNode(o,i,root,hash,relpath) |
| 598 | } else { |
| 599 | getScript(relpath+'navtreeindex'+i,function(){ |
| 600 | navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); |
| 601 | if (navTreeSubIndices[i]) { |
| 602 | gotoNode(o,i,root,hash,relpath); |
| 603 | } |
| 604 | },true); |
| 605 | } |
| 606 | } |
| 607 | |
| 608 | function showSyncOff(n,relpath) |
| 609 | { |
| 610 | n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>'); |
| 611 | } |
| 612 | |
| 613 | function showSyncOn(n,relpath) |
| 614 | { |
| 615 | n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>'); |
| 616 | } |
| 617 | |
| 618 | function toggleSyncButton(relpath) |
| 619 | { |
| 620 | var navSync = $('#nav-sync'); |
| 621 | if (navSync.hasClass('sync')) { |
| 622 | navSync.removeClass('sync'); |
| 623 | showSyncOff(navSync,relpath); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 624 | storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash')); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 625 | } else { |
| 626 | navSync.addClass('sync'); |
| 627 | showSyncOn(navSync,relpath); |
| 628 | deleteLink(); |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | function initNavTree(toroot,relpath) |
| 633 | { |
| 634 | var o = new Object(); |
| 635 | o.toroot = toroot; |
| 636 | o.node = new Object(); |
| 637 | o.node.li = document.getElementById("nav-tree-contents"); |
| 638 | o.node.childrenData = NAVTREE; |
| 639 | o.node.children = new Array(); |
| 640 | o.node.childrenUL = document.createElement("ul"); |
| 641 | o.node.getChildrenUL = function() { return o.node.childrenUL; }; |
| 642 | o.node.li.appendChild(o.node.childrenUL); |
| 643 | o.node.depth = 0; |
| 644 | o.node.relpath = relpath; |
| 645 | o.node.expanded = false; |
| 646 | o.node.isLast = true; |
| 647 | o.node.plus_img = document.createElement("img"); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 648 | o.node.plus_img.src = relpath+"ftv2pnode.png"; |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 649 | o.node.plus_img.width = 16; |
| 650 | o.node.plus_img.height = 22; |
| 651 | |
| 652 | if (localStorageSupported()) { |
| 653 | var navSync = $('#nav-sync'); |
| 654 | if (cachedLink()) { |
| 655 | showSyncOff(navSync,relpath); |
| 656 | navSync.removeClass('sync'); |
| 657 | } else { |
| 658 | showSyncOn(navSync,relpath); |
| 659 | } |
| 660 | navSync.click(function(){ toggleSyncButton(relpath); }); |
| 661 | } |
| 662 | |
| 663 | $(window).load(function(){ |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 664 | navTo(o,toroot,window.location.hash,relpath); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 665 | showRoot(); |
| 666 | }); |
| 667 | |
| 668 | $(window).bind('hashchange', function(){ |
| 669 | if (window.location.hash && window.location.hash.length>1){ |
| 670 | var a; |
| 671 | if ($(location).attr('hash')){ |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 672 | var clslink=stripPath($(location).attr('pathname'))+':'+ |
| 673 | $(location).attr('hash').substring(1); |
| 674 | a=$('.item a[class$="'+clslink+'"]'); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 675 | } |
| 676 | if (a==null || !$(a).parent().parent().hasClass('selected')){ |
| 677 | $('.item').removeClass('selected'); |
| 678 | $('.item').removeAttr('id'); |
| 679 | } |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 680 | var link=stripPath2($(location).attr('pathname')); |
| 681 | navTo(o,link,$(location).attr('hash'),relpath); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 682 | } else if (!animationInProgress) { |
| 683 | $('#doc-content').scrollTop(0); |
| 684 | $('.item').removeClass('selected'); |
| 685 | $('.item').removeAttr('id'); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 686 | navTo(o,toroot,window.location.hash,relpath); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 687 | } |
| 688 | }) |
| 689 | } |
| 690 | |