# fromValue static method

ProcessingUnit fromValue(

1. int value

)

Creates an enumeration value from int. param value The int value. return The created ProcessingUnit.

## Implementation

    static ProcessingUnit fromValue(int value) {
        	switch (value) {
          	case 0:
            	return ProcessingUnit.cpu;
          	case 1:
            	return ProcessingUnit.gpu;
          	case 2:
            	return ProcessingUnit.opencl;
          	case 3:
            	return ProcessingUnit.cuda;
          	case 4:
            	return ProcessingUnit.metal;
          	case 5:
            	return ProcessingUnit.vulkan;
        default:
            	throw Exception("Unable to find the specified enum value for $value");
        	}
      	}