Sponsored Content
Full Discussion: If else block C code
Top Forums Programming If else block C code Post 302989416 by jim mcnamara on Thursday 12th of January 2017 07:15:38 AM
Old 01-12-2017
Are you after some kind of static measure for code complexity?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP inside a block of code

I need help on the code below. I am getting a compile error syntax error at line 283 : `<<' unmatched Looks like it doesn't like the << on the ftp line below. If I ran the code outside of this block everything work fine, but when I put in a block of code or in a function, I got syntax error. I... (1 Reply)
Discussion started by: leemjesse
1 Replies

2. Programming

Explain a block of code:

Hi, I have this block in a code and I need to know it's meaning: bool selectEvents = config.get("selectEvents",false); if (selectEvents) { ifstream in("events"); while (in) { int run, evt; in >> run >> evt; if (in.eof()) break; ... (5 Replies)
Discussion started by: eager2no
5 Replies

3. UNIX and Linux Applications

Commenting out block of code in emacs in python mode

Hi, I am not sure if this is the right forum to post an emacs question, but if you could point me to an appropriate emacs forum that would be useful too. Anyway, here is the description of the problem: I usually develop python code with emacs, emacs being in python code. On my desktop a... (0 Replies)
Discussion started by: alex57326
0 Replies

4. UNIX for Dummies Questions & Answers

How to write code inside ssh block in shell?

Hi, I am new to shell script. I am trying to code on shell script but not able to find the correct syntax to write the code once it comes inside ssh. For eg: ssh -q HOST " SwapInUse=\`vmstat -nm | (while read; do echo "$(date +%Y%m%d.%H%M%S) $REPLY"; done) | tail -n +3 | awk '{print... (5 Replies)
Discussion started by: Yagami
5 Replies

5. Shell Programming and Scripting

Block of code replacement in Java source code through Unix script

Hi, I want to remove the following code from Source files (or replace the code with empty.) from all the source files in given directory. finally { if (null != hibernateSession && hibernateSession.isOpen()) { //hibernateSession.close(); } } It would be great if the script has... (2 Replies)
Discussion started by: hareeshram
2 Replies

6. UNIX for Advanced & Expert Users

Move a block of lines to file if string found in the block.

I have a "main" file which has blocks of data for each user defined by tags BEGIN and END. BEGIN ID_NUM:24879 USER:abc123 HOW:47M CMD1:xyz1 CMD2:arp2 STATE:active PROCESS:id60 END BEGIN ID_NUM:24880 USER:def123 HOW:4M CMD1:xyz1 CMD2:xyz2 STATE:running PROCESS:id64 END (7 Replies)
Discussion started by: grep_me
7 Replies

7. Shell Programming and Scripting

Printing a block of lines from a file, if that block does not contain two patterns using sed

I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed. See below for the example data. ................................server 1............................... running process 1 running... (8 Replies)
Discussion started by: Kesavan
8 Replies

8. Shell Programming and Scripting

Commenting a block of code in xml where the tags may be similar

I want to comment a block of code in xml. Note that the tags will be similar. In the below xml code, I want to block the listener block for com.pkg1.class2. How do i do it ? Thanks in Advance <listener> <listener-class>com.pkg1.class1</listener-class> </listener> ......... <listener>... (4 Replies)
Discussion started by: Lakshmikumari
4 Replies

9. UNIX for Dummies Questions & Answers

Add a block of code at the end of a specific block

I need to search for a block with the starting pattern say "tabId": "table_1", and ending pattern say "]" and then add a few lines before "]" "block1":"block_111" "tabId": "table_1", "title":"My title" ..... .... }] how do I achieve it using awk and sed. Thanks, Lakshmi (3 Replies)
Discussion started by: Lakshmikumari
3 Replies
Basic Traversal Helpers(3)				     Hardware Locality (hwloc)					Basic Traversal Helpers(3)

NAME
Basic Traversal Helpers - Functions static inline hwloc_obj_t hwloc_get_root_obj (hwloc_topology_t topology) static inline hwloc_obj_t hwloc_get_ancestor_obj_by_depth (hwloc_topology_t topology , unsigned depth, hwloc_obj_t obj) static inline hwloc_obj_t hwloc_get_ancestor_obj_by_type (hwloc_topology_t topology , hwloc_obj_type_t type, hwloc_obj_t obj) static inline hwloc_obj_t hwloc_get_next_obj_by_depth (hwloc_topology_t topology, unsigned depth, hwloc_obj_t prev) static inline hwloc_obj_t hwloc_get_next_obj_by_type (hwloc_topology_t topology, hwloc_obj_type_t type, hwloc_obj_t prev) static inline hwloc_obj_t hwloc_get_pu_obj_by_os_index (hwloc_topology_t topology, unsigned os_index) static inline hwloc_obj_t hwloc_get_next_child (hwloc_topology_t topology , hwloc_obj_t parent, hwloc_obj_t prev) static inline hwloc_obj_t hwloc_get_common_ancestor_obj (hwloc_topology_t topology , hwloc_obj_t obj1, hwloc_obj_t obj2) static inline int hwloc_obj_is_in_subtree (hwloc_topology_t topology , hwloc_obj_t obj, hwloc_obj_t subtree_root) Detailed Description Be sure to see the figure in termsanddefs that shows a complete topology tree, including depths, child/sibling/cousin relationships, and an example of an asymmetric topology where one socket has fewer caches than its peers. Function Documentation static inline hwloc_obj_t hwloc_get_ancestor_obj_by_depth (hwloc_topology_t topology, unsigneddepth, hwloc_obj_tobj) [static] Returns the ancestor object of obj at depth depth. static inline hwloc_obj_t hwloc_get_ancestor_obj_by_type (hwloc_topology_t topology, hwloc_obj_type_ttype, hwloc_obj_tobj) [static] Returns the ancestor object of obj with type type. static inline hwloc_obj_t hwloc_get_common_ancestor_obj (hwloc_topology_t topology, hwloc_obj_tobj1, hwloc_obj_tobj2) [static] Returns the common parent object to objects lvl1 and lvl2. static inline hwloc_obj_t hwloc_get_next_child (hwloc_topology_t topology, hwloc_obj_tparent, hwloc_obj_tprev) [static] Return the next child. If prev is NULL, return the first child. static inline hwloc_obj_t hwloc_get_next_obj_by_depth (hwloc_topology_ttopology, unsigneddepth, hwloc_obj_tprev) [static] Returns the next object at depth depth. If prev is NULL, return the first object at depth depth. static inline hwloc_obj_t hwloc_get_next_obj_by_type (hwloc_topology_ttopology, hwloc_obj_type_ttype, hwloc_obj_tprev) [static] Returns the next object of type type. If prev is NULL, return the first object at type type. If there are multiple or no depth for given type, return NULL and let the caller fallback to hwloc_get_next_obj_by_depth(). static inline hwloc_obj_t hwloc_get_pu_obj_by_os_index (hwloc_topology_ttopology, unsignedos_index) [static] Returns the object of type HWLOC_OBJ_PU with os_index. Note: The os_index field of object should most of the times only be used for pretty-printing purpose. Type HWLOC_OBJ_PU is the only case where os_index could actually be useful, when manually binding to processors. However, using CPU sets to hide this complexity should often be preferred. static inline hwloc_obj_t hwloc_get_root_obj (hwloc_topology_ttopology) [static] Returns the top-object of the topology-tree. Its type is typically HWLOC_OBJ_MACHINE but it could be different for complex topologies. This function replaces the old deprecated hwloc_get_system_obj(). static inline int hwloc_obj_is_in_subtree (hwloc_topology_t topology, hwloc_obj_tobj, hwloc_obj_tsubtree_root) [static] Returns true if obj is inside the subtree beginning with subtree_root. Note: This function assumes that both obj and subtree_root have a cpuset. Author Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. Version 1.7 Sun Apr 7 2013 Basic Traversal Helpers(3)
All times are GMT -4. The time now is 11:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy